1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="AbbreviationAsWordInName"> 5 <property name="allowedAbbreviationLength" value="0"/> 6 <property name="allowedAbbreviations" value="XML,URL,O"/> 7 <property name="ignoreStatic" value="false"/> 8 <property name="tokens" value="VARIABLE_DEF,CLASS_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 Example3 { 20 int firstNum; 21 int secondNUM; // violation 'no more than '1' consecutive capital letters' 22 static int thirdNum; // OK, the static modifier would be checked 23 static int fourthNUm; // violation 'no more than '1' consecutive capital letters' 24 String firstXML; // OK, XML abbreviation is allowed 25 String firstURL; // OK, URL abbreviation is allowed 26 final int TOTAL = 5; // OK, final is ignored 27 static final int LIMIT = 10; // OK, static final is ignored 28 void newOAuth2Client() {} // OK, O abbreviation is allowed 29 void OAuth2() {} // OK, O abbreviation is allowed 30 void OAUth2() {} 31 } 32 // xdoc section -- end