Files
lorakiss/.pre-commit-config.yaml
Maze X 2924c8e792 Add clang-format and clang-tidy to pre-commit hooks
- .pre-commit-config.yaml: Integrate clang-format (v17) and clang-tidy for C/C++ linting
  Excludes build artifacts (.pio), tests, and board configs from linting
- .clang-format: Configure LLVM-style formatting with 4-space indents, 88-char line limit
  Enforces right pointer alignment, comment reflow, consistent brace placement
- .clang-tidy: Configure strict static analysis with snake_case identifiers
  Enables all checks except Fuchsia/LLVM lib checks and abseil checks
  Treats warnings as errors
2026-03-27 17:41:27 +01:00

50 lines
1.2 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [markdown]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint
args: ['--fix', '--disable', 'MD040', '--disable', 'MD013']
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
types: [c, c++, header]
args: ['-i'] # In-place formatting
exclude: |
(?x)^(
\.pio/|
test/|
soc/|
hardware/
)
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-tidy
types: [c, c++, header]
args: ['-checks=*,-fuchsia-*,-llvmlibc-*']
exclude: |
(?x)^(
\.pio/|
test/|
soc/|
hardware/
)