Skip to content

Update Gersemi and make it fail on warnings#7842

Merged
achamayou merged 5 commits intomicrosoft:mainfrom
maxtropets:f/gersemi-bumpup-warnings-as-err
Apr 28, 2026
Merged

Update Gersemi and make it fail on warnings#7842
achamayou merged 5 commits intomicrosoft:mainfrom
maxtropets:f/gersemi-bumpup-warnings-as-err

Conversation

@maxtropets
Copy link
Copy Markdown
Collaborator

Noticed during #7839 :

Formatting files in cmake samples src tests CMakeLists.txt
Warning: unknown command 'add_fuzz_test' used at:
/workspaces/CCF/CMakeLists.txt:681:7

...

All checks passed

Not good, not terrible.

Added --warnings-as-errors which only exists v0.19 onwards, so decided to go 0.27 at once, because why not.

@maxtropets maxtropets self-assigned this Apr 27, 2026
@maxtropets maxtropets marked this pull request as ready for review April 27, 2026 13:39
Copilot AI review requested due to automatic review settings April 27, 2026 13:39
@maxtropets maxtropets requested a review from a team as a code owner April 27, 2026 13:39
Comment thread cmake/gersemi_definitions.cmake
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s CMake formatting workflow to use a newer gersemi version and to treat formatter warnings (eg unknown commands) as hard failures, preventing “green” formatting checks when warnings are present.

Changes:

  • Bump gersemi from 0.17.0 to 0.27.0 and enable --warnings-as-errors in the CMake format check script.
  • Add a stub definition for add_fuzz_test() so gersemi recognizes this custom CMake command.
  • Apply formatter-driven whitespace/inlining changes across several CMake files.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/check-cmake-format.sh Updates gersemi version and enables warnings-as-errors; adds explicit failure handling for -i.
cmake/gersemi_definitions.cmake Adds stub add_fuzz_test(); minor formatting changes to existing stubs.
cmake/common.cmake Formatter-driven inlining of cmake_parse_arguments(PARSE_ARGV …) calls.
cmake/ccf_app.cmake Formatter-driven inlining of cmake_parse_arguments(PARSE_ARGV …) calls.
CMakeLists.txt Formatter-driven inlining for list(), file(READ), and file(GENERATE) argument layout.
.gersemirc Updates schema URL to match gersemi 0.27.0.

Comment thread scripts/check-cmake-format.sh
@achamayou achamayou enabled auto-merge (squash) April 28, 2026 07:24
@achamayou achamayou merged commit ff89632 into microsoft:main Apr 28, 2026
19 checks passed
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.

3 participants