-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-hooks.yaml
201 lines (201 loc) · 6.61 KB
/
.pre-commit-hooks.yaml
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
- id: check-added-large-files-conda
name: check for added large files
description: prevents giant files from being committed.
entry: check-added-large-files
language: conda
stages: [pre-commit, pre-push, manual]
- id: check-ast-conda
name: check python ast
description: simply checks whether the files parse as valid python.
entry: check-ast
language: conda
types: [python]
- id: check-byte-order-marker-conda
name: 'check BOM - deprecated: use fix-byte-order-marker'
description: forbids files which have a utf-8 byte-order marker.
entry: check-byte-order-marker
language: conda
types: [text]
- id: check-builtin-literals-conda
name: check builtin type constructor use
description: requires literal syntax when initializing empty or zero python builtin types.
entry: check-builtin-literals
language: conda
types: [python]
- id: check-case-conflict-conda
name: check for case conflicts
description: checks for files that would conflict in case-insensitive filesystems.
entry: check-case-conflict
language: conda
- id: check-docstring-first-conda
name: check docstring is first
description: checks a common error of defining a docstring after code.
entry: check-docstring-first
language: conda
types: [python]
- id: check-executables-have-shebangs-conda
name: check that executables have shebangs
description: ensures that (non-binary) executables have a shebang.
entry: check-executables-have-shebangs
language: conda
types: [text, executable]
stages: [pre-commit, pre-push, manual]
- id: check-json-conda
name: check json
description: checks json files for parseable syntax.
entry: check-json
language: conda
types: [json]
- id: check-shebang-scripts-are-executable-conda
name: check that scripts with shebangs are executable
description: ensures that (non-binary) files with a shebang are executable.
entry: check-shebang-scripts-are-executable
language: conda
types: [text]
stages: [pre-commit, pre-push, manual]
- id: pretty-format-json-conda
name: pretty format json
description: sets a standard for formatting json files.
entry: pretty-format-json
language: conda
types: [json]
- id: check-merge-conflict-conda
name: check for merge conflicts
description: checks for files that contain merge conflict strings.
entry: check-merge-conflict
language: conda
types: [text]
- id: check-symlinks-conda
name: check for broken symlinks
description: checks for symlinks which do not point to anything.
entry: check-symlinks
language: conda
types: [symlink]
- id: check-toml-conda
name: check toml
description: checks toml files for parseable syntax.
entry: check-toml
language: conda
types: [toml]
- id: check-vcs-permalinks-conda
name: check vcs permalinks
description: ensures that links to vcs websites are permalinks.
entry: check-vcs-permalinks
language: conda
types: [text]
- id: check-xml-conda
name: check xml
description: checks xml files for parseable syntax.
entry: check-xml
language: conda
types: [xml]
- id: check-yaml-conda
name: check yaml
description: checks yaml files for parseable syntax.
entry: check-yaml
language: conda
types: [yaml]
- id: debug-statements-conda
name: debug statements (python)
description: checks for debugger imports and py37+ `breakpoint()` calls in python source.
entry: debug-statement-hook
language: conda
types: [python]
- id: destroyed-symlinks-conda
name: detect destroyed symlinks
description: detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to.
entry: destroyed-symlinks
language: conda
types: [file]
- id: detect-aws-credentials-conda
name: detect aws credentials
description: detects *your* aws credentials from the aws cli credentials file.
entry: detect-aws-credentials
language: conda
types: [text]
- id: detect-private-key-conda
name: detect private key
description: detects the presence of private keys.
entry: detect-private-key
language: conda
types: [text]
- id: double-quote-string-fixer-conda
name: fix double quoted strings
description: replaces double quoted strings with single quoted strings.
entry: double-quote-string-fixer
language: conda
types: [python]
- id: end-of-file-fixer-conda
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: conda
types: [text]
stages: [pre-commit, pre-push, manual]
- id: file-contents-sorter-conda
name: file contents sorter
description: sorts the lines in specified files (defaults to alphabetical). you must provide list of target files as input in your .pre-commit-config.yaml file.
entry: file-contents-sorter
language: conda
files: '^$'
- id: fix-byte-order-marker-conda
name: fix utf-8 byte order marker
description: removes utf-8 byte order marker.
entry: fix-byte-order-marker
language: conda
types: [text]
- id: fix-encoding-pragma-conda
name: fix python encoding pragma
description: 'adds # -*- coding: utf-8 -*- to the top of python files.'
language: conda
entry: fix-encoding-pragma
types: [python]
- id: forbid-new-submodules-conda
name: forbid new submodules
description: prevents addition of new git submodules.
language: conda
entry: forbid-new-submodules
types: [directory]
- id: forbid-submodules-conda
name: forbid submodules
description: forbids any submodules in the repository
language: fail
entry: 'submodules are not allowed in this repository:'
types: [directory]
- id: mixed-line-ending-conda
name: mixed line ending
description: replaces or checks mixed line ending.
entry: mixed-line-ending
language: conda
types: [text]
- id: name-tests-test-conda
name: python tests naming
description: verifies that test files are named correctly.
entry: name-tests-test
language: conda
files: (^|/)tests/.+\.py$
- id: no-commit-to-branch-conda
name: "don't commit to branch"
entry: no-commit-to-branch
language: conda
pass_filenames: false
always_run: true
- id: requirements-txt-fixer-conda
name: fix requirements.txt
description: sorts entries in requirements.txt.
entry: requirements-txt-fixer
language: conda
files: (requirements|constraints).*\.txt$
- id: sort-simple-yaml-conda
name: sort simple yaml files
description: sorts simple yaml files which consist only of top-level keys, preserving comments and blocks.
language: conda
entry: sort-simple-yaml
files: '^$'
- id: trailing-whitespace-conda
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: conda
types: [text]
stages: [pre-commit, pre-push, manual]