Skip to content

Commit eabc518

Browse files
author
runner
committed
update pre-commit-config
1 parent 6a827d3 commit eabc518

1 file changed

Lines changed: 86 additions & 94 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 86 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,88 @@
1-
# Pre-commit hooks for automated formatting and linting
2-
# See https://pre-commit.com for more information
3-
# See https://pre-commit.com/hooks.html for more hooks
4-
51
repos:
6-
# C++ formatting with clang-format
7-
- repo: https://github.com/pre-commit/mirrors-clang-format
8-
rev: v22.1.5
9-
hooks:
10-
- id: clang-format
11-
files: \.(cpp|hpp|c|h)$
12-
exclude: ^(3rdparty/|build.*/|install/)
13-
args: [--style=file]
14-
15-
# CMake formatting
16-
- repo: https://github.com/cheshirekow/cmake-format-precommit
17-
rev: v0.6.13
18-
hooks:
19-
- id: cmake-format
20-
files: \.(cmake|CMakeLists\.txt)$
21-
exclude: ^(3rdparty/|build.*/|install/)
22-
23-
# Python import sorting
24-
- repo: https://github.com/pycqa/isort
25-
rev: 9.0.0a3
26-
hooks:
27-
- id: isort
28-
args: [--settings-path, setup.cfg]
29-
30-
# Ruff Python linter
31-
- repo: https://github.com/charliermarsh/ruff-pre-commit
32-
rev: v0.15.16
33-
hooks:
34-
- id: ruff
35-
args: [--fix]
36-
- id: ruff-format
37-
38-
# Flake8 Python style/lint checker (supplemental to Ruff)
39-
- repo: https://github.com/pycqa/flake8
40-
rev: 7.3.0
41-
hooks:
42-
- id: flake8
43-
44-
# YAML linting
45-
- repo: https://github.com/adrienverge/yamllint.git
46-
rev: v1.38.0
47-
hooks:
48-
- id: yamllint
49-
50-
# EditorConfig compliance
51-
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
52-
rev: 3.6.1
53-
hooks:
54-
- id: editorconfig-checker
55-
exclude: ^(3rdparty/|build.*/|install/)
56-
args: [--disable-indent-size]
57-
58-
- repo: https://github.com/pre-commit/pre-commit-hooks
59-
rev: v6.0.0
60-
hooks:
61-
- id: check-added-large-files
62-
args: [--maxkb=1024, --enforce-all]
63-
- id: check-json
64-
files: \.json$
65-
exclude: ^(3rdparty/|build.*/|install/)
66-
- id: pretty-format-json
67-
files: \.json$
68-
exclude: ^(3rdparty/|build.*/|install/)
69-
args: [--autofix, --indent=2, --no-ensure-ascii]
70-
- id: check-yaml
71-
files: \.(yaml|yml)$
72-
exclude: ^(3rdparty/|build.*/|install/)
73-
- id: check-case-conflict
74-
exclude: ^(3rdparty/|build.*/|install/)
75-
- id: check-merge-conflict
76-
exclude: ^(3rdparty/|build.*/|install/)
77-
78-
# Dockerfile linting with hadolint
79-
- repo: https://github.com/hadolint/hadolint
80-
rev: v2.14.0
81-
hooks:
82-
- id: hadolint-docker
83-
types: [file]
84-
files: (^|/)(Dockerfile|.*\.Dockerfile)$
85-
args: [--config, .hadolint.yaml]
86-
87-
- repo: https://github.com/DavidAnson/markdownlint-cli2
88-
rev: v0.22.1
89-
hooks:
90-
- id: markdownlint-cli2
91-
exclude: ^(3rdparty/|build.*/|install/)
92-
args: ["--fix"]
93-
94-
# Configuration
95-
default_stages: [pre-commit]
2+
- repo: https://github.com/pre-commit/mirrors-clang-format
3+
rev: v23.1.2
4+
hooks:
5+
- id: clang-format
6+
files: \.(cpp|hpp|c|h)$
7+
exclude: ^(3rdparty/|build.*/|install/)
8+
args:
9+
- --style=file
10+
- repo: https://github.com/cheshirekow/cmake-format-precommit
11+
rev: v0.6.13
12+
hooks:
13+
- id: cmake-format
14+
files: \.(cmake|CMakeLists\.txt)$
15+
exclude: ^(3rdparty/|build.*/|install/)
16+
- repo: https://github.com/pycqa/isort
17+
rev: 9.0.2
18+
hooks:
19+
- id: isort
20+
args:
21+
- --settings-path
22+
- setup.cfg
23+
- repo: https://github.com/charliermarsh/ruff-pre-commit
24+
rev: v0.16.10
25+
hooks:
26+
- id: ruff
27+
args:
28+
- --fix
29+
- id: ruff-format
30+
- repo: https://github.com/pycqa/flake8
31+
rev: 7.4.1
32+
hooks:
33+
- id: flake8
34+
- repo: https://github.com/adrienverge/yamllint.git
35+
rev: v1.38.0
36+
hooks:
37+
- id: yamllint
38+
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
39+
rev: 3.11.1
40+
hooks:
41+
- id: editorconfig-checker
42+
exclude: ^(3rdparty/|build.*/|install/)
43+
args:
44+
- --disable-indent-size
45+
- repo: https://github.com/pre-commit/pre-commit-hooks
46+
rev: v6.0.0
47+
hooks:
48+
- id: check-added-large-files
49+
args:
50+
- --maxkb=1024
51+
- --enforce-all
52+
- id: check-json
53+
files: \.json$
54+
exclude: ^(3rdparty/|build.*/|install/)
55+
- id: pretty-format-json
56+
files: \.json$
57+
exclude: ^(3rdparty/|build.*/|install/)
58+
args:
59+
- --autofix
60+
- --indent=2
61+
- --no-ensure-ascii
62+
- id: check-yaml
63+
files: \.(yaml|yml)$
64+
exclude: ^(3rdparty/|build.*/|install/)
65+
- id: check-case-conflict
66+
exclude: ^(3rdparty/|build.*/|install/)
67+
- id: check-merge-conflict
68+
exclude: ^(3rdparty/|build.*/|install/)
69+
- repo: https://github.com/hadolint/hadolint
70+
rev: v2.15.1
71+
hooks:
72+
- id: hadolint-docker
73+
types:
74+
- file
75+
files: (^|/)(Dockerfile|.*\.Dockerfile)$
76+
args:
77+
- --config
78+
- .hadolint.yaml
79+
- repo: https://github.com/DavidAnson/markdownlint-cli2
80+
rev: v0.23.3
81+
hooks:
82+
- id: markdownlint-cli2
83+
exclude: ^(3rdparty/|build.*/|install/)
84+
args:
85+
- --fix
86+
default_stages:
87+
- pre-commit
9688
fail_fast: false

0 commit comments

Comments
 (0)