Skip to content

Check: Naming Conventions

Madeline Kahn edited this page Apr 14, 2024 · 6 revisions
  • Name: "namingConventions"
  • Default: Enabled

Configuration

Name Type Description
convPackage String One of the NamingConvention values. The Convention to use.
convClass String No input defaults to standard convention. Invalid input defaults to ANY.
convInterface String
convAbstract String
convEnum String
convField String
convMethod String
convConstant String
convEnumConstant String
convLocalVar String
convMethodParam String
convAllowEmptyPackage boolean Whether to allow empty package names, i.e. "". Defaults to false
convMaxLength int Maximum length. -1 for no max. Defaults to -1
NamingConvention values
lowercase
UPPERCASE
UPPER_CASE
lower_case
camelCase
PascalCase
ANY

Description

Looks at all of the

  • packages
  • classes
  • abstract classes
  • interfaces
  • enums
  • fields
  • methods
  • constants (static final)
  • Enum Constants
  • local variables
  • method Parameters

and raises a warning if the name is more than convMaxLength long, and if the name violates the specified naming convention. This is done by iterating through all classes, and for each class checking its name, package, and iterating through its fields and methods. For each method it checks its Name, Parameters, and local variables for any naming violations.