Repository navigation
ci: integrate gersemi to format and lint CMake files - #7663
ArthPatel1502 wants to merge 12 commits into
Conversation
|
Ok, nice, can you apply the changes as you mentioned you did in your verification plan? As such, we’ll see how the changes and formatting looks like |
|
And possibly add our definitions if needed |
5875fd9 to
dbabc48
Compare
dbabc48 to
9b9fc87
Compare
@echoix Done! I've run the Regarding definitions: Gersemi handles standard CMake setups cleanly out of the box with its built-in defaults. If the team decides on specific style rules down the road (like strict line-wrapping limits or lowercase/uppercase command preferences), we can easily append an |
9b9fc87 to
6ef58a3
Compare
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
pre-commit
[pre-commit] reported by reviewdog 🐶
grass/cmake/find_scripts/FindLAPACKE.cmake
Line 131 in 775c88f
[pre-commit] reported by reviewdog 🐶
grass/cmake/modules/CheckDependentLibraries.cmake
Lines 166 to 169 in 775c88f
[pre-commit] reported by reviewdog 🐶
grass/cmake/modules/CheckDependentLibraries.cmake
Lines 266 to 272 in 775c88f
|
Just so you know, even if the PR would be ready, maybe we would wait for the end of the week before merging, there are many CMake PRs currently worked on during the community meeting, so it would just force all of them to reupdate their branches. I'll take a look at the PR soon |
|
Could you actually run pre-commit on all files, just like what we would do after merging this PR? |
…as alrready defined by the hook supporting more cases
|
I'm working on this PR locally since yesterday |
…issue OSGeo#7686 [Bug] Where are CMake functions `build_pymodule_in_subdir` and `copy_python_file` defined? Fixes OSGeo#7686
…as already defined by the hook supporting more cases
…as already defined by the hook supporting more cases
Description
Addresses #7346.
This PR integrates Gersemi into the project's pre-commit pipeline to automatically format and lint CMake layout files (
CMakeLists.txtand.cmakefiles).Per the maintainer discussion on the tracking issue, Gersemi was chosen over
cmake-formatbecause it is actively maintained, supports modern CMake features, and provides an official pre-commit hook interface out of the box.Changes Made
BlankSpruce/gersemi-pre-commithook repository to.pre-commit-config.yaml.Verification Plan
pre-commit cleanto clear localized hook environment definitions.pre-commit run gersemi --all-files.