Allmanify braces (use Dscanner instead of RegExps)#5480
Closed
wilzbach wants to merge 3 commits intodlang:masterfrom
Closed
Allmanify braces (use Dscanner instead of RegExps)#5480wilzbach wants to merge 3 commits intodlang:masterfrom
wilzbach wants to merge 3 commits intodlang:masterfrom
Conversation
Member
|
Looking good. The only style that I'm unclear of is: fun({
statements
});Apparently we now require it to be e.g. fun(
{
statements
}
);Is that the case? |
Member
|
Yes, please exclude braces inside expressions. |
Codecov Report
@@ Coverage Diff @@
## master #5480 +/- ##
==========================================
+ Coverage 88.41% 88.41% +<.01%
==========================================
Files 120 120
Lines 78277 78278 +1
==========================================
+ Hits 69210 69211 +1
Misses 9067 9067
Continue to review full report at Codecov.
|
Contributor
Author
|
Closing as there's no real interest in this and I'm short on time and have bigger fish to fry. |
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.
There's a new Dscanner plugin for checking allman style: dlang-community/D-Scanner#446
It seems that this is quite a bit more precise than the RegExps used before.
I tried to use a script for all trivial cases.
Once a small fix to the brace style checker (dlang-community/D-Scanner#449) has been merged, we can enable the new allman dscanner check.
I hope this is a lot less controversial as it just improves the preciseness of the existing tests and hopefully soon let's use get rid of the ugly RegExps.
CC @CyberShadow @andralex