Skip to content

Add clazy Qt static analysis to the clang-tidy workflow#14260

Open
magnesj wants to merge 1 commit into
OPM:devfrom
magnesj:clazy-clang-tidy-integration
Open

Add clazy Qt static analysis to the clang-tidy workflow#14260
magnesj wants to merge 1 commit into
OPM:devfrom
magnesj:clazy-clang-tidy-integration

Conversation

@magnesj

@magnesj magnesj commented Jun 22, 2026

Copy link
Copy Markdown
Member

Adds clazy (Qt-oriented static analyzer) to the existing clang-tidy workflow as a non-blocking, report-only step.

What it does

  • Builds clazy 1.15 from source against the installed clang/llvm-19. Ubuntu's packaged clazy is built against an older Clang that cannot parse libstdc++-14's C++23 headers, so it must match the compiler used to generate compile_commands.json.
  • Runs clazy-standalone over the existing compile_commands.json, one process per file across all cores.
  • Excludes the two highest-volume checks (range-loop-detach, non-pod-global-static) to surface higher-signal Qt findings.
  • Skips ApplicationLibCode/UnitTests because gtest is only fetched for the test target and its headers are absent on this configure-only tree.

The step is continue-on-error: true — it reports Qt findings in the log and never fails the run or modifies files.

Build clazy 1.15 from source against the installed clang/llvm-19 (the
packaged clazy is built against an older Clang that cannot parse
libstdc++-14's C++23 headers), then run clazy-standalone over the
existing compile_commands.json as a non-blocking, report-only step.

Analysis runs one process per file across all cores. The two highest
-volume checks (range-loop-detach, non-pod-global-static) are excluded
to surface higher-signal Qt findings, and ApplicationLibCode/UnitTests
is skipped because gtest is only fetched for the test target and its
headers are absent on this configure-only tree.
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