public static final class ConformanceRules.NoImplicitlyPublicDecls extends ConformanceRules.AbstractRule
foo.bar.Baz = ...;
) to have explicit visibility
annotations, either at the declaration site or in the @fileoverview
block.compiler, message, onlyApplyTo, onlyApplyToRegexp, whitelist, whitelistRegexp
Constructor and Description |
---|
NoImplicitlyPublicDecls(AbstractCompiler compiler,
Requirement requirement) |
Modifier and Type | Method and Description |
---|---|
protected ConformanceRules.ConformanceResult |
checkConformance(NodeTraversal t,
Node n) |
private static ConformanceRules.ConformanceResult |
checkCtorProperties(ObjectType type) |
private static Node |
getScriptNode(Node start) |
private static boolean |
isWizDeclaration(Node n)
Do not check Wiz-style declarations for implicit public visibility.
|
private static ConformanceRules.ConformanceResult |
visibilityAtDeclarationOrFileoverview(JSDocInfo declaredJsDoc,
Node scriptNode) |
check, report, shouldCheckConformance
public NoImplicitlyPublicDecls(AbstractCompiler compiler, Requirement requirement) throws InvalidRequirementSpec
InvalidRequirementSpec
protected ConformanceRules.ConformanceResult checkConformance(NodeTraversal t, Node n)
checkConformance
in class ConformanceRules.AbstractRule
private static boolean isWizDeclaration(Node n)
foo.Bar = wiz.service(...);
WizPass
rewrites portions of the AST, and I believe it
does not propagate the constructor JsDoc properly. Until I have time
to investigate, this seems like a reasonable workaround.
TODO(brndn): get to the bottom of this. See b/18436759.private static ConformanceRules.ConformanceResult checkCtorProperties(ObjectType type)
private static ConformanceRules.ConformanceResult visibilityAtDeclarationOrFileoverview(@Nullable JSDocInfo declaredJsDoc, @Nullable Node scriptNode)