-
-
Notifications
You must be signed in to change notification settings - Fork 695
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
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). |
std/digest/md.d
Outdated
@@ -179,7 +179,7 @@ struct MD5 | |||
S44 = 21, | |||
} | |||
|
|||
private void transform(const(ubyte[64])* block) pure nothrow @nogc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.unit
seems 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