-
Notifications
You must be signed in to change notification settings - Fork 64
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
Pre-commit formatting pass on cpp files. #1244
Conversation
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.
At least it is consistent in how it looks. Really confused by a lot of the formatting choices, but I am not up for a war on any of this.
There is no |
If pre-commit is used we use cudf's https://github.com/NVIDIA/spark-rapids-jni/blob/branch-23.08/.pre-commit-config.yaml#L10 |
That's great, so we can reuse cudf C++ config. And we should do the same for the C++ files in cudf Java folder. |
We should automate this or enforce it in CI. |
I would suggest to create symbolic link to cudf config file so our IDE can find it automatically. |
@nvdbaranec FYI, the clang-format version defined in |
The main purpose of auto-formatting is to remove to the overhead of code-formatting discussions on the PR's. I have been +1 on this. CI does not solve this problem. The pre-commit hook does. Last time it came up, there was no consensus. If it changes we can enforce it by requiring a github action of applying that pre-commit check to succeed without a diff. |
Updated config version as per @bdice 's suggestion. |
Regarding automatic enforcement CI: running pre-commit in CI is how RAPIDS solves this, because it forces local commits and CI builds to adhere to the same rules. See https://github.com/rapidsai/cudf/blob/branch-23.08/ci/check_style.sh for cudf’s script. |
this looks exactly like the CI-based based PR check I described , which could run as a github action I may have misunderstood @hyperbolic2346 comment assuming it's about a job that periodically re formats and auto-merges reformatted code. |
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.
Changes look OK other than it needs a signoff commit per contributor guidelines.
Signed-off-by: db <[email protected]>
build |
We were behind a bit. Quite a few files got reformatted.