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#12326: Resolve Pitest suppression for AccessModifier…
…Option
- Loading branch information
1 parent
d515c25
commit 856dca1
Showing
3 changed files
with
70 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
49 changes: 49 additions & 0 deletions
49
...ycrawl/tools/checkstyle/checks/naming/accessmodifieroption/InputAccessModifierOption.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,49 @@ | ||
/* | ||
AccessModifierOption | ||
option = \tSPACE | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.naming.accessmodifieroption; | ||
|
||
|
||
public class InputAccessModifierOption { | ||
|
||
|
||
class classOne { | ||
|
||
} | ||
|
||
class classTwo { | ||
|
||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public int method1() { // violation , ' @return tag should be present and have description' | ||
return 2; | ||
} | ||
|
||
/** | ||
* @return | ||
*/ | ||
public String method2() { // violation , ' @return tag should be present and have description' | ||
return "arbitrary_string"; | ||
} | ||
|
||
/** | ||
* | ||
* @return returns something | ||
* @throws | ||
*/ | ||
public int method3() throws Exception { // violation , 'Expected @throws tag for 'Exception'' | ||
if(1!=2) | ||
System.out.println("hello world"); | ||
else | ||
throw new Exception(); | ||
return 1; | ||
} | ||
|
||
} |