-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
82 lines (78 loc) · 2.61 KB
/
.pre-commit-config.yaml
File metadata and controls
82 lines (78 loc) · 2.61 KB
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
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
priority: 0
entry: prettier --experimental-cli --write --ignore-unknown --no-cache
exclude: |
(?x)^(
.*\.snap$
)$
additional_dependencies:
- prettier@3.8.3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
priority: 10
args: [--markdown-linebreak-ext=md]
exclude: |
(?x)^(
.*\.snap$
)$
- id: end-of-file-fixer
priority: 10
exclude: |
(?x)^(
.*\.snap$
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.2
hooks:
- id: check-jsonschema
priority: 20
name: "Match meta.ymls in one of the subdirectories of modules/nf-core"
files: ^modules/nf-core/.*/meta\.yml$
types: [yaml]
args: ["--schemafile", "modules/yaml-schema.json"]
- id: check-jsonschema
priority: 20
name: "Validate environment.ymls against schema"
files: ^modules/nf-core/.*/environment\.yml$
types: [yaml]
args: ["--schemafile", "modules/environment-schema.json"]
- id: check-jsonschema
priority: 20
name: "Match meta.ymls in one of the subdirectories of subworkflows/nf-core"
files: ^subworkflows/nf-core/.*/meta\.yml$
types: [yaml]
args: ["--schemafile", "subworkflows/yaml-schema.json"]
- id: check-github-workflows
priority: 20
# use ruff for python files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.13
hooks:
- id: ruff-check
priority: 10
files: \.py$
args: [--fix, --exit-non-zero-on-fix, "--select", "I,E1,E4,E7,E9,F,UP,N"] # sort imports and fix (rules taken from nf-core/tools)
- id: ruff-format # formatter
priority: 0
# NOTE This runs with Docker instead of the binary. Hoping anyone messing with Dockerfiles has Docker installed
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint-docker
priority: 0
args: ["--failure-threshold", "error"]
- repo: https://github.com/seqeralabs/nf-lint-pre-commit
rev: v0.3.0
hooks:
- id: nextflow-lint
priority: 0
files: '\.nf$|nextflow\.config$'
args: ["-output", "json"]
# TODO add formatting at a later stage
# args: ["-format", "-sort-declarations", "-spaces", "4", "-harshil-alignment", "-output", "concise"]