-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
110 lines (110 loc) · 3.45 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
repos:
- repo: local
hooks:
- id: condalock
name: condalock
entry: ./scripts/condalock.sh
language: script
exclude: '.*'
always_run: true
fail_fast: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
- id: detect-private-key
- id: check-case-conflict
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args:
[
--application-directories=python,
--unclassifiable-application-module=_tskit,
]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.2"
hooks:
- id: ruff
args:
[
"--per-file-ignores=tests/test_utils.py:E501,manticore/tests/wm/snakemake.py:E501",
]
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
args: [--skip-errors]
additional_dependencies: [black==22.3.0]
language_version: python3
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.10.0
hooks:
- id: markdownlint-cli2
files: \.(md|qmd)$
types: [file]
exclude: LICENSE.md
- id: markdownlint-cli2-fix
files: \.(md|qmd)$
types: [file]
exclude: LICENSE.md
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: '2.7.3'
hooks:
- id: editorconfig-checker
alias: ec
pass_filenames: true
exclude: |
(?x)^(
docs/slides/population_structure/data/DavidReich/AADR\.ind|
docs/slides/population_structure/data/DavidReich/AADR\.snp|
docs/slides/population_structure/data/DavidReich/AADR\.geno|
docs/archive/.footer.html|
docs/archive/.header.html|
)
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9023
hooks:
- id: style-files
name: style-files
description: style files with {styler}
entry: Rscript inst/hooks/exported/style-files.R
language: r
files: '(\.[rR]profile|\.[rR]|\.[rR]md|\.[rR]nw|\.[qQ]md)$'
exclude: |
(?x)^(
renv/activate\.R|
docs/slides/pgip/index\.qmd|
docs/slides/datageneration/index\.qmd|
docs/slides/foundations/index\.qmd|
docs/slides/variant_filtering/index\.qmd|
docs/slides/variant_calling/index\.qmd|
docs/exercises/variant_filtering/index\.qmd|
docs/slides/simulation/index\.qmd
)$
minimum_pre_commit_version: "2.13.0"
- id: parsable-R
name: parsable-R
description: check if a .R file is parsable
entry: Rscript inst/hooks/exported/parsable-R.R
language: r
files: '\.[rR](md)?$'
minimum_pre_commit_version: "2.13.0"
- id: lintr
name: lintr
description: check if a `.R` file is lint free (using {lintr})
entry: Rscript inst/hooks/exported/lintr.R
language: r
files: '(\.[rR]profile|\.R|\.Rmd|\.Rnw|\.r|\.rmd|\.rnw)$'
exclude: 'renv/activate\.R'
minimum_pre_commit_version: "2.13.0"