Repository navigation
fix(lint): #3308 PR-A small lint-infra fixes (PchFileChecker case, AST tool detection, cache Rust sources, examples lint-on-save, FL_LINT_AB retirement) - #3320
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughRemoves the Rust-vs-Python A/B parity comparison infrastructure ( ChangesRust Lint Pipeline Cleanup and Hardening
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ool_unavailable tightening, cpp_lint cache Rust sources, lint-on-save examples, FL_LINT_AB retirement) Five small lint-infrastructure fixes from issue #3308: 1. PchFileChecker case-sensitivity divergence (HIGH) ci/lint_cpp_rs/src/checkers/structural_passes.rs now uses an exact-case ext match (Some("pch")) instead of eq_ignore_ascii_case so the Rust port matches Python's case-sensitive rglob("*.pch") on Linux/macOS. 2. _ast_tool_unavailable over-broad (HIGH) ci/lint_cpp/run_all_checkers.py: dropped the bare "no such file or directory" branch; now requires the clang-query tool name to co-occur with "not found" or "failed to spawn". 3. cpp_lint_cache.py fingerprint omits Rust sources (MEDIUM) ci/cpp_lint_cache.py: added Cargo.toml, Cargo.lock and src/**/*.rs to both the default glob list and the DependencyManifest path so local edits to Rust checkers force a re-lint. 4. lint-on-save.py skips examples/ C++ files (MEDIUM) ci/hooks/lint-on-save.py: removed the examples/ short-circuit so the Rust path runs on save for examples-scope checkers (UsingNamespaceFlInExamplesChecker, ExampleSerialChecker, etc.); the fingerprint cache keeps per-save cost low. 5. FL_LINT_AB=1 is functionally a no-op (MEDIUM) create_checkers() returns all-empty lists post-#3293, so the A/B compare was trivially empty. Removed run_rust_ab_check, _canonical_results, _print_diff_sample, RUST_SUPPORTED_CHECKERS, and remove_rust_supported_checkers from ci/lint_cpp/rust_bridge.py and stripped the FL_LINT_AB env-var plumbing from ci/lint_cpp/run_all_checkers.py. Drive-by: fixed a pre-existing pyright reportUnknownVariableType warning on parse_rust_json_output() with an explicit cast. Refs #3308 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
19c240d to
652db57
Compare
Summary
PR-A of the parallel-agent split for #3308. Five small lint-infrastructure fixes that share the same change-zone (cpp lint cache, on-save hook, Rust checker, A/B compare). No test or doc changes (PR-B/PR-C cover those).
Fixes included
ci/lint_cpp_rs/src/checkers/structural_passes.rsnow matches*.pchexact-case (mirrors Python'srglob("*.pch"), which is case-sensitive on Linux/macOS). Eliminates the cross-port over-flag of.PCH/.Pchfiles._ast_tool_unavailableover-broad (HIGH) —ci/lint_cpp/run_all_checkers.pyno longer swallows arbitrary"no such file or directory"errors from clang. Requires the tool name (clang-query/clang-tool-chain-query) to co-occur with"not found"/"failed to spawn".cpp_lint_cache.pyRust sources (MEDIUM) — addedCargo.toml,Cargo.lock,src/**/*.rsto the fingerprint glob list (both default + manifest path). Local edits to Rust checkers now invalidate the lint-success cache.lint-on-save.pyexamples short-circuit (MEDIUM) — removed; the Rust path needs to run on save for examples-scope checkers (UsingNamespaceFlInExamplesChecker,ExampleSerialChecker, examples-scopeBannedHeadersChecker). Fingerprint cache keeps cost low.FL_LINT_AB=1retirement (MEDIUM) — post-feat(lint): retire Python C++ checkers; Rust fastled-lint is default (#3288) #3293 the Pythoncreate_checkers()returns all-empty lists, so the A/B compare was trivially empty. Deletedrun_rust_ab_check,_canonical_results,_print_diff_sample,RUST_SUPPORTED_CHECKERS, andremove_rust_supported_checkersfromci/lint_cpp/rust_bridge.py; removed theFL_LINT_ABenv-var plumbing fromci/lint_cpp/run_all_checkers.py.Drive-by: tightened a pre-existing
reportUnknownVariableTypepyright finding onparse_rust_json_output()with an explicitcast.Acceptance criteria closed (4 of 9)
_ast_tool_unavailableno longer swallows real clang errorscpp_lint_cache.pyinvalidates on Rust source editslint-on-save.pyruns Rust path onexamples/C++ filesFL_LINT_ABinfrastructure retiredRemaining items (test/doc fixups) are handled by PR-B and PR-C.
Test plan
uv run python ci/lint_cpp/rust_binary_cache.py— Rust binary rebuilt cleanly afterstructural_passes.rschangeuv run python ci/lint_cpp/run_all_checkers.py— passes (default Rust path)bash lint --cpp— passesuv run pyright ci/lint_cpp/run_all_checkers.py ci/lint_cpp/rust_bridge.py ci/cpp_lint_cache.py ci/hooks/lint-on-save.py— 0 errorsRefs #3308
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
.pchartifact detection case-sensitive in C++ linting.Chores
examples/files on save.