Skip to content

Commit

Permalink
Issue #12430: Resolve Pitest suppression for SeparatorWrapCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
arinmodi committed Nov 21, 2022
1 parent e8c0f9d commit 53ea197
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ public void testTrimOptionProperty() throws Exception {
@Test
public void testCommaOnNewLine() throws Exception {
final String[] expected = {
"14:56: " + getCheckMessage(MSG_LINE_NEW, ","),
"15:10: " + getCheckMessage(MSG_LINE_NEW, ","),
"19:26: " + getCheckMessage(MSG_LINE_NEW, ","),
};
verifyWithInlineConfigParser(
getPath("InputSeparatorWrapForTestComma2.java"), expected);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
/*
SeparatorWrap
option = nl
tokens = COMMA
option = nl
*/

package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap;

public class InputSeparatorWrapForTestComma2 {

public void badCase() {
// violation below '',' should be on a new line.'
final String[] ENUM = { "SCHEDULED", "PROGRESS",
"SUSPENDED", "COMPLETED", "DISCONTINUED" };
String s;

// violation below '',' should be on a new line.'
int a,
b;

// violation below '',' should be on a new line.'
public void foo(int a,
int b) {
int r
, t; // OK
}

public void goodCase() {
final String[] ENUM = { "SCHEDULED", "PROGRESS" // OK
, "SUSPENDED", "COMPLETED", "DISCONTINUED" };
public void bar(int p
, int q) { // OK
}
}

0 comments on commit 53ea197

Please sign in to comment.