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

Make it easier to run clang-format #916

Closed
pmolodo opened this issue Nov 11, 2020 · 1 comment
Closed

Make it easier to run clang-format #916

pmolodo opened this issue Nov 11, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pmolodo
Copy link
Contributor

pmolodo commented Nov 11, 2020

Is your feature request related to a problem? Please describe.
I've noticed that since the "big format", we've already had some non-clang-formatted files slip in. While this isn't a big issue by itself, I do worry that over time this will build up, and we'll need to do another "big format."

Describe the solution you'd like
We need ways to make it easier to apply clang-format. At minimum, we should probably provide basic shell scripts which can run clang-format on the repo. #890 already gives instructions for Linux + OSX, so really all we'd need to do would be come up with a windows script, and then place them into binaries somewhere in the repo.

However, that would be a small band-aid. Really, we want a way to run clang-format in an automated fashion, on github. Looking around, I found this neat approach which uses commands given in PR comments:

peter-evans/slash-command-dispatch#11
https://peterevans.dev/posts/chatops-for-github-actions/
https://github.com/peter-evans/slash-command-dispatch

The same author also describes a previous approach he took using github actions:

https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/

I'm sure there's other ways to accomplish this, but wanted to get the conversation started...

@kxl-adsk
Copy link

kxl-adsk commented Dec 1, 2020

We have enabled clang-format lint action on the repository. Every time we run PF, we also run a clang-format check to validate if the formatting was applied.

@kxl-adsk kxl-adsk closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants