Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 86 additions & 94 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,96 +1,88 @@
# Pre-commit hooks for automated formatting and linting
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
# C++ formatting with clang-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.5
hooks:
- id: clang-format
files: \.(cpp|hpp|c|h)$
exclude: ^(3rdparty/|build.*/|install/)
args: [--style=file]

# CMake formatting
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
files: \.(cmake|CMakeLists\.txt)$
exclude: ^(3rdparty/|build.*/|install/)

# Python import sorting
- repo: https://github.com/pycqa/isort
rev: 9.0.0a3
hooks:
- id: isort
args: [--settings-path, setup.cfg]

# Ruff Python linter
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.15.16
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

# Flake8 Python style/lint checker (supplemental to Ruff)
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8

# YAML linting
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint

# EditorConfig compliance
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.6.1
hooks:
- id: editorconfig-checker
exclude: ^(3rdparty/|build.*/|install/)
args: [--disable-indent-size]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=1024, --enforce-all]
- id: check-json
files: \.json$
exclude: ^(3rdparty/|build.*/|install/)
- id: pretty-format-json
files: \.json$
exclude: ^(3rdparty/|build.*/|install/)
args: [--autofix, --indent=2, --no-ensure-ascii]
- id: check-yaml
files: \.(yaml|yml)$
exclude: ^(3rdparty/|build.*/|install/)
- id: check-case-conflict
exclude: ^(3rdparty/|build.*/|install/)
- id: check-merge-conflict
exclude: ^(3rdparty/|build.*/|install/)

# Dockerfile linting with hadolint
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint-docker
types: [file]
files: (^|/)(Dockerfile|.*\.Dockerfile)$
args: [--config, .hadolint.yaml]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.1
hooks:
- id: markdownlint-cli2
exclude: ^(3rdparty/|build.*/|install/)
args: ["--fix"]

# Configuration
default_stages: [pre-commit]
- repo: https://github.com/pre-commit/mirrors-clang-format

Check failure on line 2 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

2:1 [indentation] wrong indentation: expected at least 1
rev: v22.1.5
hooks:
- id: clang-format

Check failure on line 5 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

5:3 [indentation] wrong indentation: expected at least 3
files: \.(cpp|hpp|c|h)$
exclude: ^(3rdparty/|build.*/|install/)
args:
- --style=file

Check failure on line 9 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

9:5 [indentation] wrong indentation: expected at least 5
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format

Check failure on line 13 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

13:3 [indentation] wrong indentation: expected at least 3
files: \.(cmake|CMakeLists\.txt)$
exclude: ^(3rdparty/|build.*/|install/)
- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort

Check failure on line 19 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

19:3 [indentation] wrong indentation: expected at least 3
args:
- --settings-path

Check failure on line 21 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

21:5 [indentation] wrong indentation: expected at least 5
- setup.cfg
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff

Check failure on line 26 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

26:3 [indentation] wrong indentation: expected at least 3
args:
- --fix

Check failure on line 28 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

28:5 [indentation] wrong indentation: expected at least 5
- id: ruff-format
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8

Check failure on line 33 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

33:3 [indentation] wrong indentation: expected at least 3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint

Check failure on line 37 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

37:3 [indentation] wrong indentation: expected at least 3
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.6.1
hooks:
- id: editorconfig-checker
exclude: ^(3rdparty/|build.*/|install/)
args:
- --disable-indent-size
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args:
- --maxkb=1024
- --enforce-all
- id: check-json
files: \.json$
exclude: ^(3rdparty/|build.*/|install/)
- id: pretty-format-json
files: \.json$
exclude: ^(3rdparty/|build.*/|install/)
args:
- --autofix
- --indent=2
- --no-ensure-ascii
- id: check-yaml
files: \.(yaml|yml)$
exclude: ^(3rdparty/|build.*/|install/)
- id: check-case-conflict
exclude: ^(3rdparty/|build.*/|install/)
- id: check-merge-conflict
exclude: ^(3rdparty/|build.*/|install/)
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint-docker
types:
- file
files: (^|/)(Dockerfile|.*\.Dockerfile)$
args:
- --config
- .hadolint.yaml
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.1
hooks:
- id: markdownlint-cli2
exclude: ^(3rdparty/|build.*/|install/)
args:
- --fix
default_stages:
- pre-commit
fail_fast: false
Loading