- .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
19 lines
423 B
YAML
19 lines
423 B
YAML
---
|
|
Language: C
|
|
Standard: C99
|
|
BasedOnStyle: LLVM
|
|
IndentWidth: 4
|
|
ColumnLimit: 88
|
|
UseTab: Never
|
|
BreakBeforeBraces: Attach
|
|
AllowShortBlocksOnASingleLine: Never
|
|
AllowShortFunctionsOnASingleLine: None
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
BreakStringLiterals: true
|
|
PointerAlignment: Right
|
|
DerivePointerAlignment: false
|
|
SortIncludes: true
|
|
ReflowComments: true
|
|
MaxEmptyLinesToKeep: 2
|