1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="AbbreviationAsWordInName"> 5 <property name="allowedAbbreviationLength" value="1"/> 6 <property name="allowedAbbreviations" value="CSV"/> 7 <property name="ignoreStatic" value="true"/> 8 <property name="tokens" value="VARIABLE_DEF"/> 9 </module> 10 </module> 11 </module> 12 13 14 */ 15 16 package com.puppycrawl.tools.checkstyle.checks.naming.abbreviationaswordinname; 17 18 // xdoc section -- start 19 class Example4 { // OK, ignore checking the class name 20 int firstNum; // OK, abbreviation "N" is of allowed length 1 21 int secondNUm; 22 int secondMYNum; // violation 'no more than '2' consecutive capital letters' 23 int thirdNUM; // violation 'no more than '2' consecutive capital letters' 24 static int fourthNUM; // OK, variables with static modifier would be ignored 25 String firstCSV; // OK, CSV abbreviation is allowed 26 String firstXML; // violation 'no more than '2' consecutive capital letters' 27 final int TOTAL = 5; // OK, final is ignored 28 static final int LIMIT = 10; // OK, static final is ignored 29 } 30 // xdoc section -- end