cmake.default: fix exhausted iterable bug and clarify check-only scope - #373
Closed
neatudarius with Copilot wants to merge 5 commits into
Closed
cmake.default: fix exhausted iterable bug and clarify check-only scope#373neatudarius with Copilot wants to merge 5 commits into
neatudarius with Copilot wants to merge 5 commits into
Conversation
Move test__cmake_default__valid, test__cmake_default__invalid, and test__cmake_default__fix_inplace to be adjacent, maintaining the valid->invalid->fix pattern for each check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot
AI
changed the title
[WIP] Fix code based on review comments
cmake.default: fix exhausted iterable bug and clarify check-only scope
Jul 26, 2026
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.
Addresses two active review comments on the
cmake.defaultcheck implementation.Changes
Convert
ast_treetolistbefore multi-pass iteration (cmake.py):get_cmake_parse_tree()returns anIterable— passing it directly to_has_unconditional_library_target,_get_option_defaults, and_library_if_conditionsin sequence would silently exhaust a generator after the first call, causing the latter two methods to always see empty input. Fixed withlist(self.get_cmake_parse_tree()), consistent withcmake.skip_testsandcmake.skip_examples.Clarify fix-inplace skip reason (
test_cmake.py): Updatedtest__cmake_default__fix_inplaceskip reason from the generic"not implemented"to"fix-inplace not yet implemented: cmake.default is check-only", and expanded the docstring to explicitly document thatfix()returning guidance-only is intentional — consistent with every other cmake check in the module.