forked from typetools/checker-framework
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
The Error Prone EffectivelyPrivate https://errorprone.info/bugpattern/EffectivelyPrivate check ensures no misleading modifiers are present in code.
We follow the code style that we highlight default visibility (i.e. no explicit visibility in the source) with /*package-private*/.
This rule is not enforced, though, meaning that there might be inconsistent or no comments.
#1477 fixed the new EffectivelyPrivate errors by removing misleading modifiers.
However, it would help readability to have an explicit comment.
We could:
- Create new SOURCE-visible annotation
@PackagePrivateto replace the/*package-private*/comments - Create a different annotation for EffectivelyPrivate uses of default visibility.
- Have new checks that ensure these new annotations are used consistently (only if no explicit visibility modifier, no conflicts, etc.)
Maybe relatedly, ensure that no bridge methods are created inadvertently. (Does EP already have a check like this?)
As this new check doesn't need a type system, it might be better as an Error Prone check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels