- .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
25 lines
720 B
YAML
25 lines
720 B
YAML
---
|
|
Checks: |
|
|
*,
|
|
-fuchsia-*,
|
|
-llvmlibc-*,
|
|
-abseil-*,
|
|
-google-readability-braces-around-statements,
|
|
-readability-braces-around-statements,
|
|
-readability-implicit-bool-conversion,
|
|
HeaderFilterRegex: 'src/.*\.h'
|
|
WarningsAsErrors: '*'
|
|
CheckOptions:
|
|
- key: readability-identifier-naming.VariableCase
|
|
value: snake_case
|
|
- key: readability-identifier-naming.FunctionCase
|
|
value: snake_case
|
|
- key: readability-identifier-naming.MacroDefinitionCase
|
|
value: UPPER_CASE
|
|
- key: readability-identifier-naming.EnumConstantCase
|
|
value: UPPER_CASE
|
|
- key: modernize-use-auto.MinTypeNameLength
|
|
value: '8'
|
|
- key: performance-inefficient-string-concatenation.WarnOnImplicitConversion
|
|
value: '1'
|