ci: Add clang-tidy and cargo clippy CI checks - #32
Merged
PiotrKorkus merged 5 commits intoSep 16, 2026
Merged
PiotrKorkus merged 5 commits into
PiotrKorkus merged 5 commits into
Conversation
PiotrKorkus
reviewed
Sep 11, 2026
PiotrKorkus
reviewed
Sep 16, 2026
PiotrKorkus
approved these changes
Sep 16, 2026
PiotrKorkus
deleted the
Subramanian-K812_add_clang_tidy_and_clippy_lint
branch
September 16, 2026 08:25
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.
Add clang-tidy and cargo clippy CI checks
Adds C++ and Rust static analysis.
What this PR does
score_cpp_policies(tools/lint/linters.bzl), wired as aclang_tidy_testtarget fortest_scenarios_cpp.cargo clippy --locked --all-targets -- -D warningsagainsttest_scenarios_rust, pinned to toolchain1.92.0.build_scenarios.yml.This bypasses the shared
eclipse-score/cicd-workflowsClippy mechanism, which doesn'tactually run (0 reports on every invocation, including in
persistency). The real fix istracked at eclipse-score/baselibs#541; once that lands, this interim setup will be dropped.
Files
MODULE.bazel— addsscore_cpp_policies,toolchains_llvm(dev deps) + registersthe LLVM toolchain (
llvm_version = 22.1.7,cxx_standard,link_libs,stdlib);bumps
aspect_rules_lint1.0.3 → 2.5.0 (markeddev_dependency) andscore_bazel_cpp_toolchains0.5.1 → 0.5.4; bumpssdp_version8.0.0 → 8.0.4 on bothQNX gcc toolchains
.clang-tidy— new, local copy of thescore_cpp_policiesbaseline check groups.bazelrc— newclang-tidyconfigtools/lint/linters.bzl,tools/lint/BUILD.bazel— new, the clang-tidy aspect wiringBUILD— exports.clang-tidyso the sandboxed lint action can see itscore/test_scenarios_cpp/BUILD— adds theclang_tidytest target (tags = ["manual"], since the aspect always resolves the C++ toolchain on analysisregardless of
--config, and would otherwise break the plainbazel build //.../bazel test //...jobs).github/workflows/build_scenarios.yml— newclang-tidyandclippyjobsVerification
bazel build //.../bazel test //...(no config change) — unaffected, still passbazel test --config=clang-tidy //score/test_scenarios_cpp:clang_tidy— passes, andgenuinely executes clang-tidy (confirmed real diagnostics run, unlike the broken shared
Clippy path)
cargo clippy --locked --all-targets -- -D warningsat the pinned1.92.0toolchain —clean
Known limitations
score/test_scenarios_cpp/tests/*.cppisn't linted (aspect default excludescc_test;same as
eclipse-score/baselibs)buildifier_prebuilthas the same pre-existing unused-non-dev-dependency issueaspect_rules_linthad — left as is, out of scope here