Automate most of the 3C code style checks. #716
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 is something we've said we've wanted for a long time. It isn't particularly urgent now, but for whatever reason (maybe because I was running clang-tidy on #657 recently), I was inspired to hack it together today.
This PR includes:
lint-3c
,validate-3c
, etc.) and a script to try to automatically fix them (clang/tools/3c/utils/code_style/fix-all.sh
).main
at all times (and thus, on every PR before it is merged). We can discuss when or if we actually want to adopt such a policy. Another option is to merge the tools but just have me run them periodically as a better automated version of what I've been doing for the omnibus PRs to Microsoft.I'm going ahead and marking this PR ready for review of parts (1) and (3). Obviously, a style fix pass on
main
will be disruptive to our 3C branches in progress, so we can discuss when would be a good time to actually do it. It should be harmless to go ahead and merge part (1) by itself once we are satisfied with the quality of that code; if we want to proceed that way, I can move parts (2) and (3) to another PR and merge this one (after review), or move part (1) to another PR and merge that one.