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#12266: Resolve Pitest suppression for OperatorWrapCheck
- Loading branch information
1 parent
5ebdef4
commit 1b59d03
Showing
4 changed files
with
31 additions
and
19 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
2 changes: 1 addition & 1 deletion
2
.../com/puppycrawl/tools/checkstyle/checks/whitespace/operatorwrap/InputOperatorWrapEol.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
OperatorWrap | ||
option = EOL | ||
option = eol | ||
tokens = ASSIGN,COLON,LAND,LOR,STAR,QUESTION | ||
|
21 changes: 21 additions & 0 deletions
21
...ls/checkstyle/checks/whitespace/operatorwrap/InputOperatorWrapWithTrimOptionProperty.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,21 @@ | ||
/* | ||
OperatorWrap | ||
option = \tEOL | ||
tokens = QUESTION, COLON, EQUAL, NOT_EQUAL, DIV, PLUS, MINUS, STAR, MOD, \ | ||
SR, BSR, GE, GT, SL, LE, LT, BXOR, BOR, LOR, BAND, LAND, TYPE_EXTENSION_AND, \ | ||
LITERAL_INSTANCEOF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.operatorwrap; | ||
|
||
public class InputOperatorWrapWithTrimOptionProperty { | ||
|
||
int x = (1 < 2) ? // ok | ||
false ? "".substring(0, | ||
0).length() | ||
: false // violation '':' should be on the previous line.' | ||
? 2 : 3 : 4; // violation ''?' should be on the previous line.' | ||
|
||
} |