-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
utils: fix clang-format version check #3186
Conversation
- Adopt to the fact the result of `clang-format --version` may look slightly different on various platforms. - Make sure 'clang-format' version 15 is used (v 16+ results in unwanted changes) Closes OSGeo#3183
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.
Version extraction works. Can not comment on requirement of exact version match.
Thanks for testing! I'm afraid we have to stick to clang-format version 15 for the time being. I tested with version 16 and following files were changed:
Just for testing, I ran clang-format again on the above changed files, now with version 15. The following files changed again:
So, mixing versions will not work, the same as with Black. |
Any idea how and when to update the version? For Black, the major (breaking) releases are yearly and having the latest seems to me like the only reasonable policy because everything else seems arbitrary. At the same time, using pip to install Black was necessary at least up until recently, so having the latest version was not an issue. |
I don't think there will be reason to change this in at least a year. Most platforms provide packages with versioned clang-format and as I understand it version 15 is broadly supported. For reference: GDAL The changes after running version 16 was mainly (if not exclusively) re-formatting of pragma statements. Nothing urgent. |
- Adopt to the fact the result of `clang-format --version` may look slightly different on various platforms. - Make sure 'clang-format' version 15 is used (v 16+ results in unwanted changes) Closes OSGeo#3183
- Adopt to the fact the result of `clang-format --version` may look slightly different on various platforms. - Make sure 'clang-format' version 15 is used (v 16+ results in unwanted changes) Closes OSGeo#3183
- Adopt to the fact the result of `clang-format --version` may look slightly different on various platforms. - Make sure 'clang-format' version 15 is used (v 16+ results in unwanted changes) Closes OSGeo#3183
clang-format --version
may look slightly different on various platforms.Closes #3183