Skip to content

Files

Latest commit

 

History

History
23 lines (14 loc) · 574 Bytes

ConstantName.md

File metadata and controls

23 lines (14 loc) · 574 Bytes

Pattern: Invalid constant name

Issue: -

Description

Validates identifiers for constants (static, final fields).

Examples

Property format in module ConstantName is used to specify names to be allowed. The following configuration apart from names allowed by default allows log or logger:

<module name="ConstantName">
    <property name="format"
 value="^log(ger)?|[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
</module>

Further Reading