forked from hotosm/fmtm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
85 lines (78 loc) · 2.1 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
repos:
# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]
# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
files: ^src/backend/(?:.*/)*.*$
args: [--target-version=py39]
# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.13"
hooks:
- id: ruff
files: ^src/backend/(?:.*/)*.*$
args: [--fix, --exit-non-zero-on-fix]
# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
args:
[
--ignore-unknown,
--no-error-on-unmatched-pattern,
"!chart/**",
"!CHANGELOG.md",
"!CONTRIBUTING.md",
"!LICENSE.md",
"!src/frontend/pnpm-lock.yaml",
]
# # Lint: Dockerfile (disabled until binary is bundled)
# - repo: https://github.com/hadolint/hadolint.git
# rev: v2.12.1-beta
# hooks:
# - id: hadolint
# args:
# [
# "--ignore=DL3008",
# "--ignore=DL3013",
# "--ignore=DL3018",
# "--ignore=DL3059",
# ]
# Lint: Bash scripts
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.1.1
hooks:
- id: bashate
files: ^(?!.*(?:^|/)contrib(?:/|$)).*$
# Lint: Shell scripts
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
files: ^(?!.*(?:^|/)contrib(?:/|$)).*$
args: ["-x", "--exclude=SC2317,SC2188,SC2143"]
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
hooks:
- id: markdownlint
args:
[
--fix,
--disable,
MD033,
--ignore,
LICENSE.md,
--ignore,
CHANGELOG.md,
--ignore,
.github,
]