Skip to content

Commit

Permalink
Issue checkstyle#3102: Exclude @OverRide annotation from ignored anno…
Browse files Browse the repository at this point in the history
…tations set
  • Loading branch information
MEZk committed Sep 8, 2016
1 parent 1c87be2 commit 70db8c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/checkstyle_checks.xml
Expand Up @@ -162,7 +162,7 @@

<!-- Class Design -->
<module name="DesignForExtension">
<property name="ignoredAnnotations" value="Override, Test, Before, After, BeforeClass, AfterClass"/>
<property name="ignoredAnnotations" value="Test, Before, After, BeforeClass, AfterClass"/>
</module>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
Expand Down
Expand Up @@ -24,6 +24,7 @@
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
Expand Down Expand Up @@ -82,7 +83,7 @@
* <ul>
* <li>
* ignoredAnnotations - annotations which allows the check to skip the method from validation.
* Default value is <b>Override</b>.
* Default value is <b>Test, Before, After, BeforeClass, AfterClass</b>.
* </li>
* </ul>
*
Expand All @@ -100,7 +101,8 @@ public class DesignForExtensionCheck extends AbstractCheck {
/**
* A set of annotations which allows the check to skip the method from validation.
*/
private Set<String> ignoredAnnotations = Collections.singleton("Override");
private Set<String> ignoredAnnotations = Stream.of("Test", "Before", "After", "BeforeClass",
"AfterClass").collect(Collectors.toSet());

/**
* Sets annotations which allows the check to skip the method from validation.
Expand Down
2 changes: 1 addition & 1 deletion src/xdocs/config_design.xml
Expand Up @@ -149,7 +149,7 @@ public abstract class Plant {
Annotations which allows the check to skip the method from validation.
</td>
<td><a href="property_types.html#stringSet">String Set</a></td>
<td><code>Override</code></td>
<td><code>Test, Before, After, BeforeClass, AfterClass</code></td>
</tr>
</table>
</subsection>
Expand Down

0 comments on commit 70db8c9

Please sign in to comment.