From 92b8dabd9327f2965e96010990035d3a53540c74 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 5 Jan 2017 16:56:51 +0000 Subject: [PATCH] builder:Rule:insuppressible: add flag for rules that can't be suppressed --- .../net/kemitix/checkstyle/ruleset/builder/Rule.java | 5 +++++ builder/src/main/resources/application.yml | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java index 8bdd592..020bde6 100644 --- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java +++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java @@ -48,6 +48,11 @@ public class Rule { */ private URI uri; + /** + * Flag to indicate rules that can not be suppressed (via {@code @SuppressWarnings}. + */ + private boolean insuppressible; + /** * Configuration properties. */ diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index 06c7395..358ce4d 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -152,6 +152,7 @@ rules: level: NAMING enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_naming.html#ConstantName - name: CovariantEquals @@ -159,6 +160,7 @@ rules: level: COMPLEXITY enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_coding.html#CovariantEquals - name: CyclomaticComplexity @@ -247,6 +249,7 @@ rules: level: COMPLEXITY enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_coding.html#EqualsHashCode - name: ExecutableStatementCount @@ -627,6 +630,7 @@ rules: level: TWEAKS enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_coding.html#NoClone - name: NoFinalizer @@ -688,6 +692,7 @@ rules: level: TWEAKS enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_design.html#OneTopLevelClass - name: OperatorWrap @@ -702,6 +707,7 @@ rules: level: TWEAKS enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_misc.html#OuterTypeFilename - name: OverloadMethodsDeclarationOrder @@ -723,6 +729,7 @@ rules: level: JAVADOC enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_coding.html#PackageDeclaration - name: PackageName @@ -890,6 +897,7 @@ rules: level: NAMING enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_naming.html#TypeName - name: UncommentedMain @@ -941,6 +949,7 @@ rules: level: TWEAKS enabled: true source: CHECKSTYLE + insuppressible: true uri: http://checkstyle.sourceforge.net/config_design.html#VisibilityModifier - name: WhitespaceAfter