-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
158 lines (146 loc) · 4.47 KB
/
.pre-commit-config.yaml
File metadata and controls
158 lines (146 loc) · 4.47 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
name: "[py - check] check toml"
- id: end-of-file-fixer
name: "[py - check] validate yaml"
- id: no-commit-to-branch
name: "[git - check] no commit to branch"
args: [ --branch=main ]
- id: trailing-whitespace
name: "[file - format] trim trailing whitespace"
args: [ --markdown-linebreak-ext=md ]
- id: check-added-large-files
name: "[file - check] large file"
args: [ --maxkb=2000 ]
- id: check-docstring-first
name: "[py - check] docstring first"
files: /examples
types : [file, python ]
- id: check-json
name: "[json - check] validate json"
exclude: '^\.devcontainer/'
- id: check-merge-conflict
name: "[git - check] merge conflict"
- id: debug-statements
name: "[py - check] debug statements"
- id: detect-private-key
name: "[cred - check] private keys"
- id: fix-encoding-pragma
name: "[file - format] coding pragma"
args: [ --remove ]
- id: mixed-line-ending
name: "[file - format] mixed line ending"
args: [ --fix=auto ]
- id: pretty-format-json
name: "[json - format] pretty json"
args: [ --autofix,
--indent=4,
--no-sort-keys ]
exclude: '^\.devcontainer/'
- id: requirements-txt-fixer
name: "[reqs - format] fix requirements.txt"
- id: check-yaml
name: "[yaml - check] validate yaml"
exclude: '^mkdocs\.yml$'
- repo: https://github.com/pycqa/flake8
rev: 7.2.0
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject, flake8-bugbear, flake8-docstrings]
name: "[py - check] flake8"
exclude: ^(examples/|tests/)
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
name: "[py - format] isort"
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
- id: beautysh
name: "[bash - format] beautysh"
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
name: "[bash - lint] shell-lint"
- repo: https://github.com/rlindsgaard/pre-commit-commit-msg-hooks
rev: 0.1.0
hooks:
- id: check-description-max-length
name: "[bash - format] check-description-max-length"
- id: check-second-line-empty
name: "[bash - format] check-second-line-empty"
- id: check-summary-capitalized
name: "[bash - format] check-summary-capitalized"
- id: check-summary-imperative
name: "[bash - format] check-summary-imperative"
- id: check-summary-max-length
name: "[bash - format] check-summary-max-length"
- id: check-summary-punctuation
name: "[bash - format] check-summary-punctuation"
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: ["--skip=B101"]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.26.0
hooks:
- id: gitleaks
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: '\.ipynb$'
- repo: https://github.com/bridgecrewio/checkov
rev: 3.2.424
hooks:
- id: checkov
- repo: https://github.com/trufflesecurity/truffleHog
rev: v3.88.29
hooks:
- id: trufflehog
# - repo: local
# hooks:
# - id: safety
# name: Safety Check
# entry: safety scan --full-report
# language: system
# types: [python]
# pass_filenames: false
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.7.1
hooks:
- id: commitizen
stages: [commit-msg]
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest -vvv --cov=hydrolib --cov-report term-missing
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: examples-notebook-check
name: nbval
entry: pytest --nbval
language: system
files: \.ipynb$
- repo: local
hooks:
- id: doctest
name: doctest
entry: pytest --doctest-modules
language: system
files: ^hydrolib/.*\.py$