Repository navigation
ci(tidy): fail when a translation unit is read by no clang-tidy lane or excepted (ADR-1142) - #2196
Merged
Merged
Conversation
lusoris
force-pushed
the
rc3-tidy-coverage-2
branch
from
October 5, 2026 21:45
b4af483 to
88c5906
Compare
lusoris
force-pushed
the
rc3-tidy-coverage-2
branch
2 times, most recently
from
October 6, 2026 00:17
762fbad to
57bbc1d
Compare
14 of 16 tasks
lusoris
force-pushed
the
rc3-tidy-coverage-2
branch
2 times, most recently
from
October 6, 2026 03:03
a1d9439 to
89c211b
Compare
…or excepted (ADR-1142) (#2196) * ci(tidy): read the Objective-C++ units on the macOS lane and record the translation units the cpu and sycl lanes now read (ADR-1142) * ci(tidy): let the macOS lane produce clang-tidy's own fixes as a patch (ADR-1142) * refactor(metal): apply clang-tidy's own fixes to the Metal host code (ADR-1142) * fix(metal): keep the headers the Metal shader compiler reads as they were (ADR-1142) * fix(metal): declare the pointers clang-tidy marked const as const pointers, not pointers to const (ADR-1142) * fix(metal): keep the C headers C and include <numbers> where the fixes need it (ADR-1142) * ci(tidy): fail when a translation unit is read by no clang-tidy lane and record the Metal host code's baseline (ADR-1142) * ci(tidy): record the translation units that landed since and list the two no lane can build (ADR-1142) * test(tidy): annotate the coverage check's test helper (ADR-1142) * ci(tidy): record translation units landed on master and preserve metal contract syntax (ADR-1142) * ci(tidy): record test translation units landed on master in cpu baseline (ADR-1142) * ci(tidy): record test and vpl translation units landed on master in cpu baseline (ADR-1142) * ci(tidy): record sample range and metal plane index units in cpu baseline (ADR-1142)
lusoris
force-pushed
the
rc3-tidy-coverage-2
branch
from
October 6, 2026 03:24
89c211b to
0eef141
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every tracked C, C++, CUDA, HIP, Objective-C++ and Metal translation unit is now read by a clang-tidy lane or listed with a reason and an expiry, and a check fails when one is neither (ADR-1762, popup "Gated debt first", 2026-10-05). This is the second half of #2101, which moved the readable units into lanes.
scripts/ci/check-tidy-coverage.py(pre-commit hookscheck-tidy-coverageandtest-tidy-coverage) compares the tracked units with themeasured_sourcesof everyscripts/ci/tidy-baseline-*.jsonand with the exception list. It reads the list throughscripts/ci/lint_exceptions.py(no second format) and the tracked files through the same helper..config/lint-exceptions.d/clang-tidy-coverage.toml: 56 entries, each with a reason and an expiry (the 17.metalkernels: upstream clang-tidy has no Metal language mode, checked against LLVM mainLangStandard.h,Types.def,FrontendOptions.hon 2026-10-05; 12 MATLAB MEX sources; 11 HISS fixtures; the Pelorus mirror, one entry per file, by reference toscripts/ci/pelorus-mirror-paths.txt; the eBPF program; Windows-only, Rust-only and standalone files;core/test/test_colorspace.c(needs libzimg) andffmpeg-patches/test/fault_inject_sycl_import.c(no meson target)).write-compile-commands.pyexportsobjc_COMPILER/objcpp_COMPILERwhen the project declares the languages; without them the macOS lane's compile database held no.mmfile (the first hosted run measured 5 of 26 units).metallane:tidy-metal.ymlgains afixdispatch input that applies clang-tidy's own fixes on the runner and uploads them as a patch. First measurement of the Objective-C++ host code: 1640 findings; after 1095 automatic fixes the macOS build compiles and the lane measures 939.tidy-baseline-metal.jsonrecords them; the ratchet refuses growth. The remaining findings are tracked asT-TIDY-METAL-HOST-FINDINGS-2026-10-05(they need an Apple device to compile-test).Type
build/ci— tooling / infraChecklist
lint_exceptions.py check0 findings; tidy: cpu 16 units 0 findings (scripts/dev/tidy-lane.sh --write --only, clang-tidy 22.1.8).test_check_tidy_coverage.py(14 cases: the planted.coutside every lane, an expired entry, an entry for a unit a lane reads, a missing file, a bad date, the Pelorus mirror only through its entry, the real tree),test_write_compile_commands.py(fails without the Objective-C rules).nullptr,const,std::cmp_*and loop fixes).Bug-status hygiene
docs/state.md:T-TIDY-UNREAD-TRANSLATION-UNITS-2026-10-05closed here;T-TIDY-METAL-HOST-FINDINGS-2026-10-05opened for the 939 findings left in the Metal host code.Netflix golden-data gate
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables
## Alternatives considered.AGENTS.mdinvariant note — no rebase-sensitive invariants beyond the rebase note.changelog.d/changed/tidy-coverage-check.md.docs/rebase-notes.md, "The tidy coverage check".Reproducer
Planted defect, run in this tree: a new tracked
core/src/interop/planted_outside_every_lane.cmakes the check print "read by no clang-tidy lane and not in the exception list" and exit 1; without it the check exits 0.Known follow-ups
integer_adm_metal.mmandinteger_cambi_metal.mm, where this branch took master's side of the conflicting hunks), so the firstTidy Metalrun on master may ask for a baseline update. The workflow is not a required check.misc-const-correctness(secondfix=truepass),misc-use-anonymous-namespace(312, file-scope statics), pointer findings. See the state row.42cb17106a2d.Breaking changes / migration
None.