Allmanify Phobos and add CI check#4385
Merged
DmitryOlshansky merged 3 commits intodlang:masterfrom May 31, 2016
Merged
Conversation
Member
|
Nice work! All LGTM, except for a couple template constraints in the first commit. |
Member
Cool ;) LGTM |
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
1867381 to
a5b188f
Compare
a5b188f to
ceadc7f
Compare
Contributor
|
LGTM |
Member
|
Auto-merge toggled on |
Member
|
Nice! (IIRC these aren't manly braces, Allman is an actual person.) Is this style going to be automatically enforced going forward? |
Contributor
Author
Yes this was the entire point. Currently only with non-D grep, but in the future Dscanner will support this too ;-) |
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.
again with the power of regular expressions :)
afterwards only a small manual fixup was needed.
edit:
{at the end of the line, sowhile (true) { }is still valid