Repository navigation
fix(build): enable clang-tidy before creating targets - #1134
Merged
Merged
Conversation
This was referenced Oct 5, 2026
andiwand
force-pushed
the
review/115-integration-test-concision
branch
from
October 6, 2026 12:16
bdc86c6 to
8e367bc
Compare
andiwand
force-pushed
the
review/116-cmake-analysis
branch
from
October 6, 2026 12:20
1adaffa to
663490e
Compare
The Conan recipe never sets ODR_CLANG_TIDY, so a package build never runs clang-tidy and does not need .clang-tidy in its sources. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyTMutqSUJRGfxA8CyzMc
Since CMake 3.25 the analysis build exports the compilation database and passes it to clang-tidy with -p, so clang-tidy reads the include paths of the configured compiler. The policy file is copied into the build directory, so it also applies to generated sources. This part moved here from #1144, because it changes the block this PR adds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyTMutqSUJRGfxA8CyzMc
The Type1 fallback glyph is set in the catch, so the catch is not empty. The CID width loop reads its start once inside an explicit check, because clang-tidy 18 does not see that a zero count keeps the loop from the unchecked optional. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyTMutqSUJRGfxA8CyzMc
andiwand
force-pushed
the
review/116-cmake-analysis
branch
from
October 6, 2026 14:19
41ea373 to
09b1397
Compare
andiwand
marked this pull request as ready for review
October 6, 2026 14:19
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.
🤖 Generated with Claude Code
ODR_CLANG_TIDY=ONpreviously set a child-directory variable after targets were created, so compilation never ran clang-tidy. Configure it before target creation and fail clearly when the tool is missing. Since CMake 3.25, pass the compilation database to clang-tidy with-p, so it reads the configured compiler's include paths, and copy.clang-tidyinto the build directory for generated sources. Remove the unused downstream Conan 1 helper.With the option working, the CI tidy job runs clang-tidy 18 for real. #1137–#1144 fixed the findings it reports; this PR fixes the last two (an empty catch in the Type1 transform and an optional the CID width loop reads).
Validation: the full library and CLI build passes with clang-tidy 18 in an Ubuntu 24.04 container that matches the tidy job. OFF omits the invocation, and a missing executable fails configuration. 466 font and PDF tests pass.