Automate most of the 3C code style checks.#716
Open
mattmccutchen-cci wants to merge 3 commits intomainfrom
Open
Automate most of the 3C code style checks.#716mattmccutchen-cci wants to merge 3 commits intomainfrom
mattmccutchen-cci wants to merge 3 commits intomainfrom
Conversation
This commit includes a draft documentation update stating that the automated checks should pass on `main` at all times. This documentation is included for review; we can discuss when (or if) we want to actually impose such a policy.
This is just so that we can test that `lint-3c` is implemented correctly and passes. Some of these fixes may not be what we want, and we may do the fix pass over later.
Member
Author
|
Decision from the meeting today: We probably do want to eventually make a policy of requiring the automated style checks to pass on every PR, but we want to gain some experience with the tools first. So the plan:
We're interested in posting the status of all checks that our policy requires for each PR onto the PR as GitHub status checks, though our current setup with the private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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).mainat 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
mainwill 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.