Skip to content

Add clazy Qt static analysis to clang-tidy workflow#1007

Closed
magnesj wants to merge 1 commit into
devfrom
clazy-clang-tidy-integration
Closed

Add clazy Qt static analysis to clang-tidy workflow#1007
magnesj wants to merge 1 commit into
devfrom
clazy-clang-tidy-integration

Conversation

@magnesj

@magnesj magnesj commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Adds clazy (Qt-oriented static analyzer) to the existing clang-tidy workflow.

Changes

  • Install clazy alongside clang-tidy-19 / clang-format-19.
  • New Run clazy (Qt checks, report only) step: runs clazy-standalone -checks=level1 over the already-generated build/compile_commands.json for ApplicationLibCode and GrpcInterface. Non-blocking (continue-on-error: true) — reports only, applies no fixes.

Temporary

While validating clazy on CI, these steps are disabled via if: false (marker comment TEMP: disabled while testing clazy):

  • Run clang-tidy and apply fixes
  • Run clang-format after clang-tidy
  • create-pull-request ("Fixes by clang-tidy")

The CMake configure step is kept, since it generates the compile_commands.json clazy needs. Revert by removing the three TEMP-marked if: false lines.

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.
@magnesj magnesj force-pushed the clazy-clang-tidy-integration branch from 62fd6cd to 9d67c6d Compare June 22, 2026 05:33
@magnesj

magnesj commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

Superseded by upstream PR OPM#14260.

@magnesj magnesj closed this Jun 22, 2026
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