Class CheckConstantCaseNames

  • All Implemented Interfaces:
    CompilerPass, NodeTraversal.Callback

    public class CheckConstantCaseNames
    extends java.lang.Object
    implements NodeTraversal.Callback, CompilerPass
    This pass looks for module-level variable declarations that use CONSTANT_CASE, according to the Google style guide, and verifies that they are also annotated @const or are in a const clause.

    This pass could be extended to check CONSTANT_CASE properties in the future.

    Non-module-level variables should always use camel case according to the Google style guide. In order to not confuse users, this pass does not warn that they should be @const. (A more correct lint check could warn that non-module-locals should not be constant case.)