-
Notifications
You must be signed in to change notification settings - Fork 214
Description
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...