ci: Add github-action that automatically runs clang-format. Will not fail CI #4387
+17
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will enable us to see if Clang-Format is mad at anything in a PR and will make it easy to tell a PR author what changes to likely do.
This doesn't fail CI, as clang-format is very picky, and we sometimes disagree with it, and I don't think it makes sense at this point to fail. It will only ever output the script output into CI.
See PastaPastaPasta#24
(as a note: if in the future we want to cause this to fail, when format is unhappy, we should modify clang-format-diff.py and add a sys.exit(1) call when there is a problem, and detect that in the action.)