-
Notifications
You must be signed in to change notification settings - Fork 7k
[DO NOT MERGE] preview of chromium formatting #2073
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
Closed
Closed
Conversation
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
Any options not set in the config file defer to pep8.
This runs faster thanks to the `--parallel` flag and YAPF's builtin features. It's also a little clearer (IMO), and was run through `shellcheck` to harden up against a few of bash's many gotchas. It also actually uses the .style.yapf in the project repo, which was previously ignored.
cd to parent of script, then use git to find its own root.
1. rm useless cd's
2. Unquote array since it turns out checking the truthiness of an array
is a real pain in bash and is best done in Python or something.
3. rm useless `exit 0` since scripts exit with the status of the last
command anyway.
Added some trailing commas to make certain blocks neater. This style uses more vertical space but is (IMO) significantly more readable for a lot of code since you can just sort of scan each block independently since they're clearly delineated from each other. Feel free to revert to the last commit
This reverts commit 4579266.
It's better to have the occasional long line than to have very odd looking code. The codebase has long lines anyway, so it's not like they're totally verboten.
This should hopefully prevent some of the odder formatting.
This style looks fine to me and doesn't generally have a bunch of whitespace. A few trailing commas to split lines correctly and it should be satisfactory to everyone.
|
Test PASSed. |
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 just a preview of one style. If you like the look of it, give it a
thumbs up.
Chrome is an established project with thousands of contributors, and none of
them complain about this style.
Most of the uglier changes relating to line breaks are easily fixed by adding
the appropriate trailing comma to indicate to YAPF that you desire a line break.
Related issue number
#1971