Skip to content
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

clang-format isn't being properly enforced #305

Closed
barnes88 opened this issue Jun 4, 2024 · 6 comments
Closed

clang-format isn't being properly enforced #305

barnes88 opened this issue Jun 4, 2024 · 6 comments
Assignees
Milestone

Comments

@barnes88
Copy link
Contributor

barnes88 commented Jun 4, 2024

I don't think the method setup in #236 is properly enforcing clang-format, because the dev branch has already diverged quite a bit from the formatting (I ran it on the latest dev commit and there are quite a few changes https://github.com/barnes88/gpgpu-sim_distribution/tree/clang-format-6.4.24). This is annoying if you have your editor set to enforce formatting on save, because it causes a bunch of lines to be changed that you didn't edit.

Maybe we can have Jenkins run a formatting stage diff so we can reject PRs that aren't properly formatted. Or we need everyone in the lab to install the pre-commit hooks.

@FJShen

@tgrogers
Copy link
Contributor

tgrogers commented Jun 4, 2024 via email

@JRPan
Copy link
Collaborator

JRPan commented Jun 4, 2024

Or I can spawn a job to run the format script before merge.

@FJShen
Copy link
Contributor

FJShen commented Jun 4, 2024

Sorry for your inconvenience. Accel-Sim PR #236 (and GPGPU-Sim PR 60, which is still being reviewed) was an one-shot commit that re-formatted the code. The configuration file (.pre-commit-config.yaml) for "pre-commit" is included in the PR, but so far we don't have anything automated.

@JRPan JRPan mentioned this issue Jul 7, 2024
32 tasks
@JRPan JRPan added this to the v2.0 milestone Jul 7, 2024
@FJShen
Copy link
Contributor

FJShen commented Jul 10, 2024

@JRPan do you have anything implemented for the automatic formatting?

@JRPan
Copy link
Collaborator

JRPan commented Jul 12, 2024

Should we do automatic formatting before merging? Or reject non-formatted PR and ask people to format it?

@barnes88
Copy link
Contributor Author

I think having automatic formatting would be easiest, that way people don't have to worry about trying to match the version of clang-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants