Skip to content

Commit 88a0a2a

Browse files
committed
Add pre-commit hook setup
1 parent 2e7b223 commit 88a0a2a

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.pre-commit-config.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: gen-cli-docs
5+
name: Generate CLI docs
6+
language: system
7+
entry: make docs
8+
pass_filenames: false
9+
- repo: local
10+
hooks:
11+
- id: check-mixin-classes
12+
name: Validate mixins classes
13+
language: system
14+
entry: make check-mixins
15+
pass_filenames: false
16+
- repo: https://github.com/pre-commit/pre-commit-hooks
17+
rev: 'v4.0.1'
18+
hooks:
19+
- id: check-merge-conflict
20+
exclude: "rst$"
21+
- repo: https://github.com/asottile/yesqa
22+
rev: v1.2.3
23+
hooks:
24+
- id: yesqa
25+
- repo: https://github.com/pre-commit/mirrors-isort
26+
rev: 'v5.9.3'
27+
hooks:
28+
- id: isort
29+
- repo: https://github.com/psf/black
30+
rev: '21.8b0'
31+
hooks:
32+
- id: black
33+
language_version: python3 # Should be a command that runs python3.6+
34+
- repo: https://github.com/pre-commit/pre-commit-hooks
35+
rev: 'v4.0.1'
36+
hooks:
37+
- id: check-case-conflict
38+
- id: check-json
39+
- id: check-xml
40+
- id: check-yaml
41+
- id: debug-statements
42+
- id: check-added-large-files
43+
- id: end-of-file-fixer
44+
exclude: "[.]md$"
45+
- id: requirements-txt-fixer
46+
- id: trailing-whitespace
47+
exclude: "[.]md$"
48+
- id: check-symlinks
49+
- id: debug-statements
50+
# Another entry is required to apply file-contents-sorter to another file
51+
- repo: https://github.com/pre-commit/pre-commit-hooks
52+
rev: 'v4.0.1'
53+
hooks:
54+
- id: file-contents-sorter
55+
files: |
56+
.gitignore
57+
- repo: https://github.com/asottile/pyupgrade
58+
rev: 'v2.25.0'
59+
hooks:
60+
- id: pyupgrade
61+
args: ['--py36-plus']
62+
- repo: https://gitlab.com/pycqa/flake8
63+
rev: '3.9.2'
64+
hooks:
65+
- id: flake8

0 commit comments

Comments
 (0)