-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
99 lines (92 loc) · 2.55 KB
/
.pre-commit-config.yaml
File metadata and controls
99 lines (92 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
repos:
########## Precommit Hooks #########
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
exclude: ^manifest/.*\.yaml$
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-vcs-permalinks
exclude: ^manifest/charts/
- id: check-symlinks
- id: destroyed-symlinks
- id: pretty-format-json
args: ["--autofix"]
exclude: 'tsconfig.*\.json'
######### golang fmt and go tidey #########
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt
args: [-w]
- id: go-mod-tidy
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
args: [--line-length=88]
# # Import sorter (runs before Black)
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile=black"]
# # Linter (flake8 for code quality)
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- --max-line-length=88
- --extend-ignore=E203,W503
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-docstrings
# # Static code analysis for Python (pylint optional)
- repo: https://github.com/pycqa/pylint
rev: v3.0.0
hooks:
- id: pylint
args: ["--disable=C0114,C0115,C0116"]
additional_dependencies:
- pylint-django
- flask
- fastapi
- pydantic
- pymongo
- python-jose
- python-keycloak
- pyparsing
- websockets
- kubernetes
- dapr
- PyYAML
# # Stylelint
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
rev: v15.10.3
hooks:
- id: stylelint
files: \.(css|scss)$
# exclude: "node_modules/"
types: [file, css]
additional_dependencies:
- stylelint@15.10.3
- stylelint-config-standard@34.0.0
args: ['--config', '.stylelintrc.json', '--fix']
# # Codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
files: ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
args: ['--ignore-words=.codespell-ignore-words']
# # Gitleaks
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.0
hooks:
- id: gitleaks
args: ["detect", "--verbose"]
verbose: true