Repository navigation
Conversation
Signed-off-by: Anton Krivoborodov <anton.krivoborodov@bmw.de>
clang-tidy only reads .clang-tidy files in the directories above the linted file. The baseline lives in score_cpp_policies' external repository, so passing it in configs never applied it: modules without their own config ran with clang-tidy's default checks only. Without local_configs the baseline is now passed as the config file. Local configs replace the baseline, since --config-file disables clang-tidy's config search and the two cannot be layered. Signed-off-by: Anton Krivoborodov <anton.krivoborodov@bmw.de>
antonkri
force-pushed
the
fix/clang-tidy-baseline
branch
from
November 25, 2026 12:39
efbc80b to
df3b9b1
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
make_clang_tidy_aspectpasses the S-CORE baseline inconfigsoflint_clang_tidy_aspect. aspect_rules_lint only puts those files into the sandbox; clang-tidy reads.clang-tidyonly from the directories above the linted file. The baseline is inexternal/score_cpp_policies+/clang_tidy/, so it is never applied.local_configs(score_time, this repo's self-test): clang-tidy 22 aborts withError: no checks enabled.(run).local_configs(score_baselibs, score_persistency, score_logging): only the local file applies. score_logging's has noChecks.Changes
clang_tidy/defs.bzl: withoutlocal_configs, the baseline is passed asglobal_config(--config-file). Withlocal_configs, they are passed asconfigsand replace the baseline (--config-filedisables clang-tidy's config search, so both cannot be combined).clang_tidy/README.md: setup usesmake_clang_tidy_aspect; documents that a local config replaces the baseline.tests/BUILD.bazel,tests.yml: jobclang-tidy baselinelintsviolations/clang_tidy_violation.cppand expectsbugprone-use-after-move(only enabled by the baseline).Verification
clang-tidy baselinedf3b9b1(test only)Error: no checks enabled.c8fb812(test + fix)Consumer check: eclipse-score/reference_integration#502 pins
c8fb812for score_logging, score_time and score_config_management and lints them withmake_clang_tidy_aspect.Impact
local_configsset: no change.local_configs: the baseline applies for the first time, includingWarningsAsErrors: clang-analyzer-*.local_configs(its.clang-tidyonly setsHeaderFilterRegex) to get the baseline.Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References