lint/configured/cpp
A linter is configured
Implements lint/configured for cpp.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | cpp |
| Scope | each |
| Kind | outcome |
| Source | library v0.3.1 |
| Selected by | fleetlint-recommended@v0.3.1 |
Requirement
A static analyzer runs on the code: clang-tidy with a committed .clang-tidy, run by the build (CMAKE_CXX_CLANG_TIDY), a hook, the task runner or CI; or cppcheck run the same way. Another analyzer is added with accept:.
Why
Without a committed configuration every developer’s editor runs different checks and the build runs none.
Fix
Add .clang-tidy (fleetlint fix --apply writes it) and run clang-tidy over compile_commands.json in the lint target, or set CMAKE_CXX_CLANG_TIDY.
Agent instruction: Add .clang-tidy from the template and a lint target that runs clang-tidy (run-clang-tidy -p build) over compile_commands.json; fix findings rather than disabling checks.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
See: https://fleetlint.org/baseline/#static-analysis, https://fleetlint.org/stacks/#cc
Generated by fleetlint docs from catalog v0.3.1.