lint.sh runs nowhere in CI, and .clang-tidy sets Checks: *, which enables every vendor check shipped with clang-tidy.
Why main looks green
.clang-tidy carries AnalyzeTemporaryDtors, removed in clang-tidy 16. clang-tidy rejects the key, exits 0, and falls back to the default check set — so Checks: * has never actually applied. Measured on one TU: 1 warning under main's config, dozens once the key is dropped. lint.sh passing on main means nothing.
scripts/lint.sh on main is also run-clang-tidy -p build with no source filter, so much of what it walked was CPM/dependency code rather than ours.
What a real run finds
With the key dropped, over src/, test/, benchmark/ — roughly 18,000 unique warnings, dominated by checks written for other projects' coding standards:
| group |
share |
note |
llvmlibc-*, altera-*, fuchsia-*, zircon-*, … |
~2/3 |
vendor checks for LLVM's libc, FPGA compilers, Fuchsia — none apply here |
misc-include-cleaner, readability-identifier-length, readability-magic-numbers |
most of the rest |
style/opinion |
bugprone-*, performance-*, clang-analyzer-*, concurrency-*, cert-* |
~350 |
the part worth acting on |
The config is the problem, not the code.
Proposal
- Replace
Checks: * with an explicit list, dropping the vendor families outright.
- Triage the ~350 bugprone / performance / analyzer findings.
- Only then add a lint job to
ci-pr.yml next to the existing format.sh --check.
Note on gating: WarningsAsErrors: '' means warnings alone don't fail the run, but run-clang-tidy still returns non-zero if any TU emits a clang-diagnostic-error. A gating job wants WarningsAsErrors set to the curated list, so warnings actually fail it.
Counts are approximate, from a full clang-tidy 19.1.7 run on Debian
lint.shruns nowhere in CI, and.clang-tidysetsChecks: *, which enables every vendor check shipped with clang-tidy.Why main looks green
.clang-tidycarriesAnalyzeTemporaryDtors, removed in clang-tidy 16. clang-tidy rejects the key, exits 0, and falls back to the default check set — soChecks: *has never actually applied. Measured on one TU: 1 warning under main's config, dozens once the key is dropped.lint.shpassing on main means nothing.scripts/lint.shon main is alsorun-clang-tidy -p buildwith no source filter, so much of what it walked was CPM/dependency code rather than ours.What a real run finds
With the key dropped, over
src/,test/,benchmark/— roughly 18,000 unique warnings, dominated by checks written for other projects' coding standards:llvmlibc-*,altera-*,fuchsia-*,zircon-*, …misc-include-cleaner,readability-identifier-length,readability-magic-numbersbugprone-*,performance-*,clang-analyzer-*,concurrency-*,cert-*The config is the problem, not the code.
Proposal
Checks: *with an explicit list, dropping the vendor families outright.ci-pr.ymlnext to the existingformat.sh --check.Note on gating:
WarningsAsErrors: ''means warnings alone don't fail the run, butrun-clang-tidystill returns non-zero if any TU emits aclang-diagnostic-error. A gating job wantsWarningsAsErrorsset to the curated list, so warnings actually fail it.Counts are approximate, from a full clang-tidy 19.1.7 run on Debian