-
Notifications
You must be signed in to change notification settings - Fork 51
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
Code formatting #222
base: main
Are you sure you want to change the base?
Code formatting #222
Conversation
I also significantly improved the description of code-formatting in the documentation
I made a few tweaks based on the work I had done while creating similar a similar PR for Enzo-E (in enzo-project/enzo-e#420) These changes include:
Footnotes
|
I added a 3.4 milestone to this (but we can change it). My primary motivation for doing this was Britton's idea that we could start more broadly applying formatting after the next release. |
Overview
As a followup to #218, This introduced a basic configuration file for the pre-commit software that calls clang-format and ruff run code-formatting on all new c/c++/python files added to grackle. All existing files will not be touched. (with that said, I tested out the new c/c++ linting on
src/clib/utils.c
andsrc/clib/utils.h
since they are unlikely to have merge conflicts).I also added documentation explaining how to locally run this machinery.
We are interested in using pre-commit.ci, which is a continuous integration system designed around pre-commit.
yt
actually makes use of pre-commit.ciWhat we need to do after merging
We will need to go to the pre-commit.ci and enable it for the grackle repository. (I'm happy to try to do that, but I may not have appropriate permissions -- so Britton may ultimately need to do that)