forked from checkstyle/checkstyle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#12409: Inconsistentency In Allowed Abbreviations
- Loading branch information
Showing
6 changed files
with
192 additions
and
65 deletions.
There are no files selected for viewing
120 changes: 60 additions & 60 deletions
120
config/archunit-store/slices_should_be_free_of_cycles_suppressions
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...e/checks/naming/abbreviationaswordinname/InputAbbreviationAsWordInNameTypeSnakeStyle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
AbbreviationAsWordInName | ||
allowedAbbreviations = ORDER, OBSERVATION, UNDERSCORE, TEST | ||
*/ | ||
|
||
|
||
package com.puppycrawl.tools.checkstyle.checks.naming.abbreviationaswordinname; | ||
|
||
public class InputAbbreviationAsWordInNameTypeSnakeStyle { | ||
// violation below '.* name 'FLAG_IS_FIRST_RUN' must contain no more than '4' .* cap.*.' | ||
public boolean FLAG_IS_FIRST_RUN = false; | ||
|
||
// violation below '.* name 'HBCKL_LOCK_PATH' must contain no more than '4' .* cap.*.' | ||
private int HBCKL_LOCK_PATH; | ||
|
||
Boolean[] BOOL_VALS = { false, true }; | ||
|
||
// violation below '.* name '__DEMOS__TESTS_VAR' must contain no more than '4' .* cap.*.' | ||
private int __DEMOS__TESTS_VAR = 5; | ||
|
||
private int __DEMO__TEST_VAR = 6; | ||
|
||
void getTEST() { | ||
} // ok | ||
|
||
void getORDER_OBSERVATION() {} // ok | ||
|
||
void getNONE_Test() {} | ||
|
||
void getCLR_Test() {} // ok | ||
|
||
void getUNDERSCORE() {} // ok | ||
|
||
void getTEST_OBSERVATION() {} // ok | ||
|
||
void getTEST_UNDERSCORE() {} // ok | ||
|
||
void getORDER() {} // ok | ||
|
||
void getOBSERVATION() {} // ok | ||
|
||
void getORDER_UNDERSCORE() {} // ok | ||
|
||
int getCLRTest() { // ok | ||
int LINE_SEP = 1; | ||
return LINE_SEP; | ||
} | ||
|
||
void getNON_ETest() {} // OK | ||
|
||
// violation below '.* name 'getIsFIRST_Run' must contain no more than '4' .* cap.*.' | ||
private boolean getIsFIRST_Run() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters