Skip to content

Conversation

@blowekamp
Copy link
Member

Use gersemi to apply automatic formatting to CMake file with pre-commit.

@blowekamp
Copy link
Member Author

blowekamp commented Jun 19, 2025

I used the following prompt to generate the stubs:

Please look at the section called "Let's make a deal" in the following document: https://github.com/BlankSpruce/gersemi/blob/master/README.md for each cmake function defined in this file create a subs file in the CMake/stubs directory to describe the arguments for the gersemi formatter.

Copy link
Member

@zivy zivy left a comment

Choose a reason for hiding this comment

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

In most cases the list_expansion is an improvement, though in some cases I find the results to be less readable than the original non-expanded version.

Still, using this linter for CMake is an improvement as it enforces uniformity. Nice addition.

@blowekamp blowekamp force-pushed the add-gersemi-cmake-formatter branch 2 times, most recently from 128576a to 5429c33 Compare June 23, 2025 17:12
@blowekamp blowekamp marked this pull request as ready for review June 23, 2025 20:06
@blowekamp blowekamp force-pushed the add-gersemi-cmake-formatter branch from 5429c33 to ae25ff6 Compare June 23, 2025 20:55
@blowekamp blowekamp marked this pull request as draft June 24, 2025 12:07
@blowekamp blowekamp marked this pull request as ready for review June 24, 2025 17:54
Apply a consistent style to all CMake files.
 Automatically format CMake files for consistency.
 The configuration is provided in .gersemi.config.
 by https://github.com/BlankSpruce/gersemi
@blowekamp blowekamp force-pushed the add-gersemi-cmake-formatter branch from ae25ff6 to 4cb1612 Compare June 24, 2025 17:56
@blowekamp blowekamp force-pushed the add-gersemi-cmake-formatter branch from 4cb1612 to 10d75e6 Compare June 24, 2025 18:10
@blowekamp blowekamp merged commit d9e685e into SimpleITK:master Jun 24, 2025
8 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.

2 participants