Remove redundant access specifier from Phobos#5477
Conversation
|
Cool, but I thought the suggestion was
|
I should read messages on my phone in more detail 😆 (I also opened a new Dscanner issue). |
| S44 = 21, | ||
| } | ||
|
|
||
| private void transform(const(ubyte[64])* block) pure nothrow @nogc |
There was a problem hiding this comment.
I actually think there's merit in using private like this as opposed to the label form. In the label form the user has to browse in this case all the way up to line 98 to figure that the symbol is indeed private. And of course make sure there's no other intervening label. In the hierarchy of ease to assess, we have per-symbol (nicest), scope-introducing, and label.
Can you please change this PR a bit to only keep the label removals?
|
Btw in case someone is interested, I have thrown together a PR for Dscanner that allows to use white and blacklists of modules for specific checks, so hopefully once this PR is merged, we don't need to go "all-or-nothing" in the beginning, but can gradually increase the propagation of a check. |
7856d08 to
89c2239
Compare
|
so what's the status here? on a cursory look lgtm |
I think I discovered a small bug in the RedundantAccessAttribute checker, that's why this on hold. I will get back to it in the next few days. Sorry. On the bright side (thanks to #5495), we now have selective check for modules and everyone can help out reducing the check-specific blacklisted modules. https://github.com/dlang/phobos/blob/master/.dscanner.ini |
89c2239 to
63712f4
Compare
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#5477" |
|
@andralex I rebased this and should be good to go. |
andralex
left a comment
There was a problem hiding this comment.
Fine, though I'm a fan of private attached to individual declaration (Java/C#/etc style) as opposed to long-acting private: which is brittle in the face of refactorings.
Follow-up to #5466 (comment) and preparation for the Dscanner plugin: dlang-community/D-Scanner#441
std.unitseems to quite generous with scope-wide access specifiers. Hence, it might also make sense to reduce the impact of the almost module-wideprivate:...CC @andralex @DmitryOlshansky