|
1 | 1 | --- |
2 | | -# See https://pre-commit.com for more information |
3 | | -# See https://pre-commit.com/hooks.html for more hooks |
4 | | -exclude: | |
5 | | - (?x)^( |
6 | | - tools/schemacode/bidsschematools/tests/data/broken_dataset_description.json |
7 | | - | CNAME |
8 | | - )$ |
| 2 | +exclude: "(?x)^(\n tools/schemacode/bidsschematools/tests/data/broken_dataset_description.json\n | CNAME\n)$\n" |
9 | 3 | repos: |
10 | 4 | - repo: https://github.com/pre-commit/pre-commit-hooks |
11 | 5 | rev: v6.0.0 |
12 | 6 | hooks: |
13 | 7 | - id: trailing-whitespace |
14 | 8 | - id: end-of-file-fixer |
15 | 9 | - id: check-yaml |
16 | | - exclude: | |
17 | | - (?x)^( |
18 | | - mkdocs.yml |
19 | | - )$ |
| 10 | + exclude: "(?x)^(\n mkdocs.yml\n)$\n" |
20 | 11 | - id: check-json |
21 | 12 | - id: check-added-large-files |
22 | 13 | - id: check-case-conflict |
23 | 14 | - id: check-merge-conflict |
24 | 15 | - id: mixed-line-ending |
25 | | - |
26 | 16 | - repo: https://github.com/codespell-project/codespell |
27 | | - rev: v2.4.1 |
| 17 | + rev: v2.4.2 |
28 | 18 | hooks: |
29 | 19 | - id: codespell |
30 | | - args: [--toml, pyproject.toml] |
31 | | - additional_dependencies: [tomli] |
32 | | - |
| 20 | + args: |
| 21 | + - --toml |
| 22 | + - pyproject.toml |
| 23 | + additional_dependencies: |
| 24 | + - tomli |
33 | 25 | - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt |
34 | 26 | rev: 0.2.3 |
35 | 27 | hooks: |
36 | 28 | - id: yamlfmt |
37 | | - args: [--mapping, '4', --sequence, '4', --offset, '0'] |
38 | | - exclude: | |
39 | | - (?x)^( |
40 | | - docs/specification/.* |
41 | | - | mkdocs.yml |
42 | | - )$ |
43 | | -
|
| 29 | + args: |
| 30 | + - --mapping |
| 31 | + - '4' |
| 32 | + - --sequence |
| 33 | + - '4' |
| 34 | + - --offset |
| 35 | + - '0' |
| 36 | + exclude: "(?x)^(\n docs/specification/.*\n | mkdocs.yml\n)$\n" |
44 | 37 | - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks |
45 | 38 | rev: v2.16.0 |
46 | 39 | hooks: |
47 | 40 | - id: pretty-format-toml |
48 | | - args: [--autofix, --indent, '4', --no-sort, --trailing-commas] |
49 | | - |
| 41 | + args: |
| 42 | + - --autofix |
| 43 | + - --indent |
| 44 | + - '4' |
| 45 | + - --no-sort |
| 46 | + - --trailing-commas |
50 | 47 | - repo: https://github.com/djlint/djLint |
51 | 48 | rev: v1.36.4 |
52 | 49 | hooks: |
53 | 50 | - id: djlint |
54 | | - exclude: | |
55 | | - (?x)^( |
56 | | - templates/.*md.jinja |
57 | | - )$ |
| 51 | + exclude: "(?x)^(\n templates/.*md.jinja\n)$\n" |
58 | 52 | - id: djlint-reformat |
59 | | - exclude: | |
60 | | - (?x)^( |
61 | | - templates/.*md.jinja |
62 | | - )$ |
| 53 | + exclude: "(?x)^(\n templates/.*md.jinja\n)$\n" |
63 | 54 | - id: djlint-jinja |
64 | | - exclude: | |
65 | | - (?x)^( |
66 | | - templates/.*md.jinja |
67 | | - )$ |
| 55 | + exclude: "(?x)^(\n templates/.*md.jinja\n)$\n" |
68 | 56 | - id: djlint-reformat-jinja |
69 | | - exclude: | |
70 | | - (?x)^( |
71 | | - templates/.*md.jinja |
72 | | - )$ |
73 | | -
|
74 | | - # Check formatting of CSS |
75 | | - # prettier: https://prettier.io/ |
| 57 | + exclude: "(?x)^(\n templates/.*md.jinja\n)$\n" |
76 | 58 | - repo: https://github.com/rbubley/mirrors-prettier |
77 | 59 | rev: v3.8.1 |
78 | 60 | hooks: |
79 | 61 | - id: prettier |
80 | | - types_or: [css] |
81 | | - |
82 | | - # Lint and format Python code |
| 62 | + types_or: |
| 63 | + - css |
83 | 64 | - repo: https://github.com/astral-sh/ruff-pre-commit |
84 | | - rev: v0.15.4 |
| 65 | + rev: v0.15.5 |
85 | 66 | hooks: |
86 | 67 | - id: ruff-check |
87 | | - # args: [--statistics] |
88 | | - args: [--fix, --show-fixes, --unsafe-fixes] |
| 68 | + args: |
| 69 | + - --fix |
| 70 | + - --show-fixes |
| 71 | + - --unsafe-fixes |
89 | 72 | - id: ruff-format |
90 | | - # args: [--diff] |
| 73 | +ci: |
| 74 | + autoupdate_commit_msg: 'chore: update pre-commit hooks' |
| 75 | + autoupdate_schedule: monthly |
| 76 | + autofix_commit_msg: 'style: pre-commit fixes' |
0 commit comments