Skip to content

Limit clang-tidy CI to changed files on branch workflows#390

Open
simon-d-bmw wants to merge 1 commit intoeclipse-openbsw:mainfrom
simon-d-bmw:gh-381-limit-clang-tidy-ci-scope
Open

Limit clang-tidy CI to changed files on branch workflows#390
simon-d-bmw wants to merge 1 commit intoeclipse-openbsw:mainfrom
simon-d-bmw:gh-381-limit-clang-tidy-ci-scope

Conversation

@simon-d-bmw
Copy link
Contributor

@simon-d-bmw simon-d-bmw commented Mar 12, 2026

Summary

  • run the full clang-tidy scan only on pushes to main
  • run clang-tidy on changed .c, .cc, and .cpp files for pull requests, merge groups, and other branch pushes
  • skip clang-tidy cleanly when no C/C++ files changed

Details

  • add a dedicated CI helper to determine clang-tidy scope from the GitHub event payload
  • keep the existing clang-tidy findings export and reporting flow
  • treat an empty clang-tidy findings YAML as zero findings so filtered runs do not fail when no diagnostics are emitted
  • update the developer documentation to describe the branch-vs-main behavior

Refs #381

@simon-d-bmw simon-d-bmw force-pushed the gh-381-limit-clang-tidy-ci-scope branch from f13cceb to eb5e155 Compare March 13, 2026 06:55
…nbsw#381)

Run the full clang-tidy scan only on pushes to main.
Use changed C/C++ files for pull requests, merge groups,
and other branch pushes.

Treat an empty findings YAML as zero findings so
changed-file clang-tidy runs do not fail when no
diagnostics are emitted.
@simon-d-bmw
Copy link
Contributor Author

CI scope validation campaign summary (branch-event changed-scope behavior):

  • Validation completed across 8 scenarios with posix + s32k1xx matrix jobs.
  • Overall result: successful; no workflow crashes in scope or resolver path.
  • S01 is considered a scenario-selection limitation (changed header not included in analyzed target set), not a resolver mismatch.
  • S08 confirms the mapped-header positive case (header-only change resolved to many TUs on both matrix jobs).
  • S07 (merge-history) passed with merge commit + follow-up commit.

Validation PR references (all test PRs now closed):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant