fleetlint Policy for a fleet of repositories
v0.10
Getting started

lint/configured/cpp

A linter is configured

Implements lint/configured for cpp.

Severitywarning
Tiers1, 2
Stackscpp
Scopeeach
Kindoutcome
Sourcelibrary v0.7.0
Selected byfleetlint-recommended@v0.7.0

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)).

A finding of this rule points at .clang-tidy.

Sources


Generated by fleetlint docs from catalog v0.7.0.