Skip to content

[ClangTidy] Rework clang tidy job (Again)#66435

Open
troopa81 wants to merge 1 commit into
qgis:masterfrom
troopa81:fix_clangtidy_disabling_pch
Open

[ClangTidy] Rework clang tidy job (Again)#66435
troopa81 wants to merge 1 commit into
qgis:masterfrom
troopa81:fix_clangtidy_disabling_pch

Conversation

@troopa81

@troopa81 troopa81 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Supersedes previous solution now reverted #66355.

Use the same logic as pre-commit to apply clang-tidy-diff on the appropriate set of commits. Lot of modification were missed before.

Also:

  • Remove the message

error: file '/root/QGIS/src/core/qgis.h' has been modified since the precompiled header '/root/QGIS/build/src/gui/CMakeFiles/qgis_gui.dir/cmake_pch.hxx.pch' was built: mtime changed (was 1779181563, now 1779188122) [clang-diagnostic-error]
note: please rebuild precompiled header '/root/QGIS/build/src/gui/CMakeFiles/qgis_gui.dir/cmake_pch.hxx.pch'

To fix the pch error, I just propose to disable precompiled headers. I tested it on several clang-tidy issues and everything seems to work neatly this time.

  • Fail correctly using WarningsAsErrors (instead of tee + grep)
  • Cleanup the way we install/launch clang-tidy-diff
  • Remove the useless clang-tidy.sh (clang-tidy is enought)

AI tool usage

  • AI tool(s) (Copilot, Claude, or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. Failure to be honest might result in banning.

@github-actions github-actions Bot added the Chore GitHub and other CI infrastructure changes label Jun 10, 2026
@github-actions github-actions Bot added this to the 4.2.0 milestone Jun 10, 2026
- Disable precompiled header and unity build which break the workflow
- Fail correctly using WarningsAsErrors (instead of tee + grep)
- Cleanup the way we install/launch clang-tidy-diff
- Remove the useless clang-tidy.sh (clang-tidy is enougth)
@troopa81 troopa81 force-pushed the fix_clangtidy_disabling_pch branch from c2dfd5d to 314bd58 Compare June 11, 2026 06:25
@troopa81 troopa81 closed this Jun 11, 2026
@troopa81 troopa81 reopened this Jun 11, 2026
@troopa81

Copy link
Copy Markdown
Contributor Author

unrelated test failure

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

Labels

Chore GitHub and other CI infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant