Repository navigation
[beman-tidy] Implement cmake.skip_tests - #346
Merged
neatudarius merged 1 commit intoJul 26, 2026
Merged
neatudarius merged 1 commit into
neatudarius merged 1 commit into
Conversation
neatudarius
force-pushed
the
implement/issue-73-cmake-skip-tests
branch
3 times, most recently
from
July 15, 2026 23:58
5917911 to
4709e8f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for the Beman Standard check cmake.skip_tests, intended to ensure a project’s root CMakeLists.txt defines BEMAN_<short_name>_BUILD_TESTS (defaulting to ${PROJECT_IS_TOP_LEVEL}) and guards add_subdirectory(tests...) behind if(BEMAN_<short_name>_BUILD_TESTS).
Changes:
- Introduces
CMakeSkipTestsCheckregistered ascmake.skip_tests. - Adds pytest coverage for valid/invalid
cmake.skip_testscases. - Adds new invalid CMakeLists fixtures for missing option, wrong default, and missing guard.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| beman_tidy/lib/checks/beman_standard/cmake.py | Adds the new cmake.skip_tests check implementation. |
| tests/lib/checks/beman_standard/cmake/test_cmake.py | Adds tests for cmake.skip_tests (check-only; fix test is skipped). |
| tests/lib/checks/beman_standard/cmake/data/invalid/invalid-skip_tests-v1.txt | Invalid fixture: missing the required BEMAN_<short_name>_BUILD_TESTS option. |
| tests/lib/checks/beman_standard/cmake/data/invalid/invalid-skip_tests-v2.txt | Invalid fixture: option default is ON instead of ${PROJECT_IS_TOP_LEVEL}. |
| tests/lib/checks/beman_standard/cmake/data/invalid/invalid-skip_tests-v3.txt | Invalid fixture: tests are not guarded by if(BEMAN_<short_name>_BUILD_TESTS). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
neatudarius
force-pushed
the
implement/issue-73-cmake-skip-tests
branch
5 times, most recently
from
July 16, 2026 00:30
25243d8 to
e0667c9
Compare
This was referenced Jul 16, 2026
neatudarius
force-pushed
the
implement/issue-73-cmake-skip-tests
branch
5 times, most recently
from
July 16, 2026 06:56
b1d78b4 to
04b258f
Compare
neatudarius
force-pushed
the
implement/issue-73-cmake-skip-tests
branch
from
July 16, 2026 06:58
04b258f to
9407ad0
Compare
Use shared cmake utils for unguarded add_subdirectory detection.
neatudarius
force-pushed
the
implement/issue-73-cmake-skip-tests
branch
from
July 16, 2026 07:12
9407ad0 to
aa09345
Compare
neatudarius
marked this pull request as ready for review
July 16, 2026 07:29
neatudarius
requested review from
JeffGarland,
ednolan,
rishyak and
vickgoodman
as code owners
July 16, 2026 07:29
This was referenced Jul 16, 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.
Implements #73
Local tested - it already runs and passes for 20/22 libraries in org. Check linked PRs for fixing remaining libraries.
This PR will be merged when all Beman library are green or their .beman-tidy.yml config disables this check.