forked from teast21/snpOracle
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
executable file
·120 lines (118 loc) · 3.73 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
repos:
- repo: local
hooks:
##########################
# FORMATTERS #
##########################
- id: black
name: black
description: Format Python code
language: system
types: [python]
entry: black
exclude: |
(?x)^(
.git/.*|
docs/.*|
mining_models/.*|
contrib/.*|
scripts/.*|
.venv/.*
)$
- id: isort
name: isort
description: Format Python import statements
language: system
types: [python]
entry: isort
exclude: |
(?x)^(
.git/.*|
docs/.*|
mining_models/.*|
contrib/.*|
scripts/.*|
.venv/.*
)$
##########################
# LINTERS #
##########################
# - id: mypy
# name: mypy
# description: Enforce correct python type hints
# language: system
# types: [python]
# entry: mypy
- id: flake8
name: flake8
description: Enforce PEP8 Python Style Guide
language: system
types: [python]
entry: flake8
exclude: |
(?x)^(
.git/.*|
docs/.*|
mining_models/.*|
contrib/.*|
scripts/.*|
.venv/.*
)$
##########################
# STANDARD #
##########################
- id: check-added-large-files
name: check for added large files
description: prevents giant files from being committed.
entry: check-added-large-files
language: system
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0
args: ['--maxkb=500']
- id: check-ast
name: check python ast
description: simply checks whether the files parse as valid python.
entry: check-ast
language: system
types: [python]
- id: check-merge-conflict
name: check for merge conflicts
description: checks for files that contain merge conflict strings.
entry: check-merge-conflict
language: system
types: [text]
- id: check-toml
name: check toml
description: checks toml files for parseable syntax.
entry: check-toml
language: system
types: [toml]
- id: end-of-file-fixer
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0
- id: no-commit-to-branch
name: "don't commit to branch"
entry: no-commit-to-branch
language: system
pass_filenames: false
always_run: true
args: [--branch, main, --branch, dev]
- id: requirements-txt-fixer
name: fix requirements.txt
description: sorts entries in requirements.txt.
entry: requirements-txt-fixer
language: system
files: (requirements|dev_requirements).*\.txt$
- id: trailing-whitespace
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
minimum_pre_commit_version: 3.2.0