Skip to content

Allmanify braces (use Dscanner instead of RegExps)#5480

Closed
wilzbach wants to merge 3 commits intodlang:masterfrom
wilzbach:allmanify_braces
Closed

Allmanify braces (use Dscanner instead of RegExps)#5480
wilzbach wants to merge 3 commits intodlang:masterfrom
wilzbach:allmanify_braces

Conversation

@wilzbach
Copy link
Contributor

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

@andralex
Copy link
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?

@CyberShadow
Copy link
Member

Yes, please exclude braces inside expressions.

@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #5480 into master will increase coverage by <.01%.
The diff coverage is 96.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5480      +/-   ##
==========================================
+ Coverage   88.41%   88.41%   +<.01%     
==========================================
  Files         120      120              
  Lines       78277    78278       +1     
==========================================
+ Hits        69210    69211       +1     
  Misses       9067     9067
Impacted Files Coverage Δ
std/zlib.d 62.8% <ø> (ø) ⬆️
std/container/rbtree.d 94.16% <ø> (ø) ⬆️
std/internal/math/gammafunction.d 94.03% <ø> (ø) ⬆️
std/utf.d 85.52% <ø> (ø) ⬆️
std/experimental/allocator/common.d 94.38% <ø> (ø) ⬆️
std/algorithm/sorting.d 98.71% <ø> (ø) ⬆️
std/meta.d 98.46% <ø> (ø) ⬆️
std/mathspecial.d 47.5% <ø> (ø) ⬆️
std/uri.d 83.06% <ø> (ø) ⬆️
std/regex/package.d 93.4% <ø> (ø) ⬆️
... and 47 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0553161...af66b33. Read the comment docs.

@wilzbach
Copy link
Contributor Author

Closing as there's no real interest in this and I'm short on time and have bigger fish to fry.

@wilzbach wilzbach closed this Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants