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#12264: Resolve Pitest suppression for MethodParamPad…
…Check
- Loading branch information
1 parent
5ebdef4
commit cf38372
Showing
3 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
...l/tools/checkstyle/checks/whitespace/methodparampad/InputMethodParamPadSetOptionTrim.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,32 @@ | ||
/* | ||
MethodParamPad | ||
allowLineBreaks = (default)false | ||
option = \tspace | ||
tokens = (default)CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL, \ | ||
ENUM_CONSTANT_DEF, RECORD_DEF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.methodparampad; | ||
|
||
public class InputMethodParamPadSetOptionTrim { | ||
|
||
public void method1() { // violation ''(' is not preceded with whitespace' | ||
int a = 1, b = 2; | ||
if (a > b) { | ||
System.out.println ("true"); | ||
} | ||
} | ||
|
||
public int method2 () { // ok | ||
return 1; | ||
} | ||
|
||
public Boolean method3() { // violation ''(' is not preceded with whitespace' | ||
if (4 < 5) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
} |