builder: meet level 4 tweaks
* Add missing Rule SuppressWarningsFilter * Suppress HideUtilityClassConstructor on main class
This commit is contained in:
parent
9eb00f5a16
commit
e2069b8d0d
9 changed files with 20 additions and 1 deletions
|
@ -276,6 +276,7 @@ Rule|Level|Source|Enabled|Suppressable
|
|||
[SuperClone](#superclone)|tweaks|checkstyle||
|
||||
[SuperFinalize](#superfinalize)|tweaks|checkstyle||
|
||||
[SuppressWarnings](#suppresswarnings)|naming|checkstyle|Yes|
|
||||
[SuppressWarningsFilter](#suppresswarningsfilter)|naming|checkstyle|Yes|
|
||||
[SuppressWarningsHolder](#suppresswarningsholder)|naming|checkstyle|Yes|
|
||||
[TernaryPerExpressionCount](#ternaryperexpressioncount)|tweaks|sevntu|Yes|
|
||||
[ThrowsCount](#throwscount)|complexity|checkstyle|Yes|
|
||||
|
@ -2071,6 +2072,10 @@ Prevents the use of `@SuppressWarnings` for the following checks:
|
|||
|
||||
Used by Checkstyle to hold the checks to be suppressed from `@SuppressWarnings(...)` annotations.
|
||||
|
||||
#### [SuppressWarningsFilter](http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsFilter)
|
||||
|
||||
Allows the use of the `@SuppressWarnings` annotation.
|
||||
|
||||
#### [ThrowsCount](http://checkstyle.sourceforge.net/config_design.html#ThrowsCount)
|
||||
|
||||
Restricts non-private methods to only `throws` 4 distinct Exception types. Exceptions should be hierarchical to allow catching suitable root Exceptions.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<checkstyle.version>7.3</checkstyle.version>
|
||||
<sevntu-checkstyle-maven-plugin.version>1.22.0</sevntu-checkstyle-maven-plugin.version>
|
||||
<kemitix-checkstyle-ruleset.version>2.0.0-SNAPSHOT</kemitix-checkstyle-ruleset.version>
|
||||
<kemitix-checkstyle-ruleset.level>3-javadoc</kemitix-checkstyle-ruleset.level>
|
||||
<kemitix-checkstyle-ruleset.level>4-tweaks</kemitix-checkstyle-ruleset.level>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||
*/
|
||||
@EnableConfigurationProperties({RulesProperties.class, OutputProperties.class})
|
||||
@SpringBootApplication
|
||||
@SuppressWarnings("hideutilityclassconstructor")
|
||||
public class CheckstyleRulesetBuilderApplication {
|
||||
|
||||
/**
|
||||
|
|
|
@ -854,6 +854,13 @@ rules:
|
|||
enabled: true
|
||||
source: CHECKSTYLE
|
||||
uri: http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsHolder
|
||||
-
|
||||
name: SuppressWarningsFilter
|
||||
parent: CHECKER
|
||||
level: NAMING
|
||||
enabled: true
|
||||
source: CHECKSTYLE
|
||||
uri: http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsFilter
|
||||
-
|
||||
name: ThrowsCount
|
||||
parent: TREEWALKER
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
Allows the use of the `@SuppressWarnings` annotation.
|
|
@ -12,6 +12,7 @@
|
|||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
<module name="Translation"/>
|
||||
<module name="UniqueProperties"/>
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
<module name="Translation"/>
|
||||
<module name="UniqueProperties"/>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
<module name="Translation"/>
|
||||
<module name="UniqueProperties"/>
|
||||
|
||||
|
|
Loading…
Reference in a new issue