This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
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#5003: increased coverage of pitest-checks-whitespace…
… to 98%
- Loading branch information
Showing
16 changed files
with
203 additions
and
10 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
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
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
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
6 changes: 6 additions & 0 deletions
6
...e/checks/whitespace/emptylineseparator/InputEmptyLineSeparatorPrePreviousLineIsEmpty.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,6 @@ | ||
|
||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator; | ||
|
||
public class InputEmptyLineSeparatorPrePreviousLineIsEmpty { | ||
} |
34 changes: 34 additions & 0 deletions
34
...le/checks/whitespace/emptylineseparator/InputEmptyLineSeparatorPreviousLineEmptiness.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,34 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator; | ||
|
||
public class InputEmptyLineSeparatorPreviousLineEmptiness { | ||
private static final int MULTIPLICATOR; | ||
|
||
private int base; | ||
|
||
static { | ||
MULTIPLICATOR = 5; | ||
|
||
|
||
} | ||
|
||
{ | ||
|
||
|
||
base = 33; | ||
} | ||
|
||
public InputEmptyLineSeparatorPreviousLineEmptiness(int base) { | ||
|
||
|
||
this.base = base; | ||
} | ||
|
||
public InputEmptyLineSeparatorPreviousLineEmptiness() { | ||
} | ||
|
||
public static int increment(int value) { | ||
|
||
|
||
return value * MULTIPLICATOR + 1; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...heckstyle/checks/whitespace/genericwhitespace/InputGenericWhitespaceAtStartOfTheLine.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,15 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.genericwhitespace; | ||
|
||
import java.util.Collections; | ||
|
||
class InputGenericWhitespaceAtStartOfTheLine { | ||
|
||
public String getConstructor(Class<?>... parameterTypes) | ||
{ | ||
Collections.<Object | ||
>emptySet(); | ||
Collections. | ||
<Object>emptySet(); | ||
return "pitest makes me cry"; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...wl/tools/checkstyle/checks/whitespace/genericwhitespace/InputGenericWhitespaceNested.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,12 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.genericwhitespace; | ||
|
||
public class InputGenericWhitespaceNested { | ||
interface IntEnum { /*inner enum*/} | ||
|
||
interface NumberEnum<T> { /*inner enum*/} | ||
|
||
static class IntEnumValue implements IntEnum, NumberEnum<Integer> {} | ||
|
||
static class IntEnumValueType<E extends Enum<E | ||
>& IntEnum & NumberEnum<E>> {} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ckstyle/checks/whitespace/nowhitespacebefore/InputNoWhitespaceBeforeAtStartOfTheLine.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,16 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace | ||
.nowhitespacebefore; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class InputNoWhitespaceBeforeAtStartOfTheLine { | ||
public static class A { | ||
private A() { | ||
} | ||
} | ||
|
||
public <V> void methodName(V value) { | ||
Supplier<?> t = | ||
A ::new; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...m/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/InputParenPadStartOfTheLine.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,8 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.parenpad; | ||
|
||
public class InputParenPadStartOfTheLine { | ||
public String checkSmth( String | ||
a) { | ||
return a + 1; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ls/checkstyle/checks/whitespace/whitespacearound/InputWhitespaceAroundStartOfTheLine.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,8 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.whitespace.whitespacearound; | ||
|
||
public class InputWhitespaceAroundStartOfTheLine { | ||
public void checkSmth( | ||
){ | ||
final int SOMETHING = 1; | ||
} | ||
} |