-
Notifications
You must be signed in to change notification settings - Fork 10
/
.pre-commit-config.yaml
100 lines (94 loc) · 3.79 KB
/
.pre-commit-config.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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
# https://github.com/pre-commit/pre-commit-hooks/blob/master/README.md
hooks:
- id: check-added-large-files # Prevent giant files from being committed.
stages: [commit, push]
- id: check-ast # Simply check whether files parse as valid python.
stages: [commit, push]
- id: check-byte-order-marker # Forbid files which have a UTF-8 byte-order marker
stages: [commit, push]
- id: check-docstring-first # Checks for a common error of placing code before the docstring.
stages: [commit, push]
exclude: raylab/cli/
- id: check-executables-have-shebangs # Checks that non-binary executables have a proper shebang.
stages: [commit, push]
- id: check-json # Attempts to load all json files to verify syntax.
stages: [commit, push]
- id: check-merge-conflict # Check for files that contain merge conflict strings.
stages: [commit, push]
- id: check-symlinks # Checks for symlinks which do not point to anything.
stages: [commit, push]
- id: check-vcs-permalinks # Ensures that links to vcs websites are permalinks.
stages: [commit, push]
- id: check-xml # Attempts to load all xml files to verify syntax.
stages: [commit, push]
- id: check-yaml # Attempts to load all yaml files to verify syntax.
stages: [commit, push]
- id: debug-statements # Check for debugger imports and py37+ breakpoint() calls in python source.
stages: [commit, push]
- id: detect-private-key # Checks for the existence of private keys.
stages: [commit, push]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
stages: [commit, push]
- id: forbid-new-submodules # Prevent addition of new git submodules.
stages: [commit, push]
- id: mixed-line-ending # Replaces or checks mixed line ending.
stages: [commit, push]
- id: pretty-format-json # Checks that all your JSON files have keys that are sorted and indented.
stages: [commit, push]
- id: trailing-whitespace # Trims trailing whitespace.
stages: [commit, push]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
stages: [commit, push]
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
stages: [commit, push]
- id: isort
name: isort (cython)
types: [cython]
stages: [commit, push]
- id: isort
name: isort (pyi)
types: [pyi]
stages: [commit, push]
- repo: https://github.com/python/black
rev: 20.8b1
hooks:
- id: black
stages: [commit, push]
args: [--check]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v3.0.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
- repo: local
hooks:
- id: pylint-main
name: Pylint main
entry: pylint
language: system
types: [python]
stages: [commit]
args: ["-d similarities,abstract-method,missing-function-docstring"]
files: ^raylab/
- repo: local
hooks:
- id: pylint-test
name: Pylint test
entry: pylint
language: system
types: [python]
stages: [commit]
args: [--rcfile=tests/pylintrc, "-d similarities,abstract-method,missing-function-docstring"]
files: ^tests/