-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cMake: Add cMake file formatting to pre-commit #15792
base: main
Are you sure you want to change the base?
Conversation
cMake/FindCoin3DDoc.cmake
Outdated
# COIN3D_DOC_FOUND - we have access to Coin3D doc, either locally or on the net | ||
# COIN3D_DOC_TAGFILE - full name of the tag file COIN3D_DOC_PATH - path to html Coin3D doc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting here is imprecise: COIN3D_DOC_PATH - path to html Coin3D doc
needs to be on a newline
I don't love the removal of spaces from things like
That seems too compressed to my eye, so I'm inclined to also change that setting to enforce a space before the paren. |
5de2471
to
0f2d55c
Compare
Comments welcome, we will talk about this in the next dev meeting. |
Waiting for further review |
Most of the auto-formatting is OK or acceptable but in cases like cMake/FreeCadMacros.cmake or src/Mod/Fem/CMakeLists.txt it completely breaks readability. |
0f2d55c
to
7fb9014
Compare
Can you clarify which elements you are concerned about in those files? Nothing jumps out at me, so I'm not sure what to adjust in the configuration to resolve your comment. ETA: If in the FreeCadMacros it was the argument list formatting, I've cleaned that up (the auto-formatter is very picky about what it recognizes as a list). |
068d978
to
f9ef016
Compare
Yes, this is what I was talking about. Looks much better now. Thanks! But the problems in Fem's CMakeLists.txt file still exist. In the handwritten form one filename per line was used while now there are two or three filenames per line which is more difficult to read. |
I did some playing around with the |
Skipping this one at today's M3 since it's not blocking the RC |
1ef4ea7
to
edf3959
Compare
1361f05
to
437efb9
Compare
d0dbc1f
to
0d11c57
Compare
This is a proposed solution to fix #15780 -- it adds our cMake files to a pre-commit auto-formatter, and applies that format to all cMake files. Details: