-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
45 lines (41 loc) · 1.07 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: check-json
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: end-of-file-fixer
files: 'hugo/'
exclude: '^(hugo/static/|hugo/content/)'
- id: trailing-whitespace
files: '^(hugo/|scripts/|tests/)'
exclude: 'hugo/static/'
# for markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint-fix
args: ['--config', '.github/.markdownlint.yaml']
files: '^hugo/content/.*'
# for python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
files: '^scripts/.*'
# Run the formatter.
- id: ruff-format
files: '^scripts/.*'
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args: ["-f", "gcc", "-S", "warning"]
files: 'scripts/.*'
exclude: 'scripts/data_stewardship'
types_or: [shell, bash]