-
Notifications
You must be signed in to change notification settings - Fork 357
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
Update clang-format to version 9 #2235
Conversation
I think you can review now. Most of the changes are auto-generated, so you might want to restrict yourself to the manual changes in documentation and scripts pointed out in the description. |
Is there a specific reason for using clang format 9, given that the current version of clang is 13? |
Yes, there is. 9 is the version that is available in both Ubuntu 20.04 (LTS), which we're using on the CI, and on the most recent version 21.10. If we're using a newer version, we'd have to use the LLVM Ubuntu archive on the CI, which is of course also possible, but would require additional package repositories for developers still using an older version of Ubuntu. |
That sounds like a reasonable reason for using 9. Maybe add a comment to the script to explain the choice, also for future reference. Is there any hope that clang-format at some point will make all rules configurable so we could just say clang >= N? |
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.
That's much more readable and improves code style in many many places. 🎉 🥳
There are some spots that might need a brief look though. Maybe settings can fix that, but deeper code rewriting should of course not go into this PR.
Thanks a lot for diving into this! 🐠 🐟 🐚 🤿
Co-authored-by: Dennis Terhorst <terhorstd@users.noreply.github.com>
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.
@jougs Looks good in principle, but I ran into one technical problem, see below. I have only checked the "mechanics", not the effect on formatting.
Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
@heplesser: I've committed your suggestion. Does this resolve your issues? |
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.
@jougs Thank, all works now under M1 and the check passes, testing all (or at least a lot of) files.
@terhorstd: are you happy with the latest changes? Thanks! |
Maybe it would be good to write a mail to the user list about this one and warn that it could be wise to reformat the code in own branches using clang-format 9 before pulling master after this has been merged? Maybe the mail could include the following snippet? wget --content-disposition "https://raw.githubusercontent.com/nest/nest-simulator/6b1f1cbb960eb476d672df1b6a0ec02fb1e803a2/build_support/format_all_c_c%2B%2B_files.sh"
bash format_all_c_c++_files.sh
rm format_all_c_c++_files.sh |
@jougs That sounds like a good idea. I'd suggest to send it out a day or so before you merge. |
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.
Nice! Thanks a lot! 👍
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.
Cheers!
@terhorstd: can you please also send the mail to the NEST user list about how to get own branches updated before pulling upstream master? Thanks! |
The title has it all.