Skip to content

Commit

Permalink
Issue sevntu-checkstyle#437: Fix NumericLiteralNeedsUnderscore proper…
Browse files Browse the repository at this point in the history
…ties
  • Loading branch information
cypai authored and Charlie Pai committed Mar 10, 2016
1 parent 59fdd95 commit 04340df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ protected enum NumericType {
/**
* Sets how many characters in a decimal literal there must be before it checks for an
* underscore.
* @param len
* @param length
* minimum checking length of the literal
*/
public void setMinDecimalSymbolLen(int len) {
minDecimalSymbolLength = len;
public void setMinDecimalSymbolLength(int length) {
minDecimalSymbolLength = length;
}

/**
Expand All @@ -281,11 +281,11 @@ public void setMaxDecimalSymbolsUntilUnderscore(int amount) {
/**
* Sets how many characters in a hex literal there must be before it checks for an
* underscore.
* @param len
* @param length
* minimum checking length of the literal
*/
public void setMinHexSymbolLen(int len) {
minHexSymbolLength = len;
public void setMinHexSymbolLength(int length) {
minHexSymbolLength = length;
}

/**
Expand All @@ -301,11 +301,11 @@ public void setMaxHexSymbolsUntilUnderscore(int amount) {
/**
* Sets how many characters in a byte literal there must be before it checks for an
* underscore.
* @param len
* @param length
* minimum checking length of the literal
*/
public void setMinBinarySymbolLen(int len) {
minBinarySymbolLength = len;
public void setMinBinarySymbolLength(int length) {
minBinarySymbolLength = length;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public void test() throws Exception {
@Test
public void testWithConfig() throws Exception {
DefaultConfiguration checkConfig = createCheckConfig(NumericLiteralNeedsUnderscoreCheck.class);
checkConfig.addAttribute("minDecimalSymbolLen", "1");
checkConfig.addAttribute("minDecimalSymbolLength", "1");
checkConfig.addAttribute("maxDecimalSymbolsUntilUnderscore", "3");
checkConfig.addAttribute("minHexSymbolLen", "1");
checkConfig.addAttribute("minHexSymbolLength", "1");
checkConfig.addAttribute("maxHexSymbolsUntilUnderscore", "2");
checkConfig.addAttribute("minBinarySymbolLen", "1");
checkConfig.addAttribute("minBinarySymbolLength", "1");
checkConfig.addAttribute("maxBinarySymbolsUntilUnderscore", "4");
final String[] expected = {
"23: " + warningMessage,
Expand Down Expand Up @@ -135,7 +135,7 @@ public void testConfiguredIgnore() throws Exception {
final DefaultConfiguration checkConfig =
createCheckConfig(NumericLiteralNeedsUnderscoreCheck.class);
checkConfig.addAttribute("ignoreFieldNamePattern", "RED");
checkConfig.addAttribute("minDecimalSymbolLen", "1");
checkConfig.addAttribute("minDecimalSymbolLength", "1");
final String[] expected = {
"7: " + warningMessage,
"8: " + warningMessage,
Expand Down

0 comments on commit 04340df

Please sign in to comment.