diff --git a/CHANGELOG b/CHANGELOG index 39bc793..885ac62 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG ========= +3.4.1 +----- + +* \[bug] update the ruleset files +* Add missing reasons for disabling checks + 3.4.0 ----- diff --git a/README.md b/README.md index 1475469..f76f6de 100644 --- a/README.md +++ b/README.md @@ -90,8 +90,8 @@ Rule|Level|Source|Enabled|Suppressible [AvoidModifiersForTypes](#avoidmodifiersfortypes)|unspecified|sevntu|| [AvoidNestedBlocks](#avoidnestedblocks)|complexity|checkstyle|Yes| [AvoidNotShortCircuitOperatorsForBoolean](#avoidnotshortcircuitoperatorsforboolean)|tweaks|sevntu|Yes| -[AvoidStarImport](#avoidstarimport)|layout|checkstyle|Yes| -[AvoidStaticImport](#avoidstaticimport)|complexity|checkstyle|Yes| +[AvoidStarImport](#avoidstarimport)|layout|checkstyle|| +[AvoidStaticImport](#avoidstaticimport)|complexity|checkstyle|| [BooleanExpressionComplexity](#booleanexpressioncomplexity)|complexity|checkstyle|Yes| [CatchParameterName](#catchparametername)|naming|checkstyle|Yes| [CauseParameterInException](#causeparameterinexception)|tweaks|sevntu|| @@ -414,37 +414,6 @@ Invalid: // ... } ```` -#### [AvoidStarImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport) - -Prevents the use of the star import. - -Invalid: -```` -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import javax.swing.event.*; -```` -#### [AvoidStaticImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport) - -Prevents importing static members, unless they are one of the following: - -* `org.assertj.core.api.Assertions.assertThat` -* `org.mockito.BDDMockito.given` -* `org.mockito.Mockito.*` -* `org.mockito.Matchers.*` -* `org.mockito.Mockito.*` - -Valid: -```` -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.BDDMockito.given; -```` - -Invalid: -```` -import static java.nio.charset.StandardCharsets.UTF_8; -```` #### [BooleanExpressionComplexity](http://checkstyle.sourceforge.net/config_metrics.html#BooleanExpressionComplexity) Restrict the number of number of &&, ||, &, | and ^ in an expression to 2. @@ -1233,7 +1202,7 @@ Checks that paragraphs in Javadoc blocks are wrapped in `

` elements and have Checks the formatting of the Javadoc blocks. See the official [Checkstyle documentation](http://checkstyle.sourceforge.net/config_javadoc.html#JavadocStyle) for all the checks that are applied. #### [JavadocType](http://checkstyle.sourceforge.net/config_javadoc.html#JavadocType) -Checks the format for Javadoc for classes and enums. Javadoc must be present, not have any unknown tags and not missing any `@param` tags. The `@author` tag must have a name and, in brackets, an email address. +Checks the format for Javadoc for classes and enums. Javadoc must be present, not have any unknown tags and not missing any `@param` tags. #### [JavaNCSS](http://checkstyle.sourceforge.net/config_metrics.html#JavaNCSS) Restricts the NCSS score for methods, classes and files to 40, 1200 and 1600 respectively. The NCSS score is a measure of the number of statements within a scope. @@ -2681,6 +2650,13 @@ These checks are not enabled. Notes are included for each explaining why. #### [ArrayTrailingComma](http://checkstyle.sourceforge.net/config_coding.html#ArrayTrailingComma) Couldn't get my IDE's (IntelliJ) code style to match. +#### [AvoidStarImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport) + +Ref: Clean Code, Robert C. Martin, J1: Avoid Long Import Lists by Using Wildcards +#### [AvoidStaticImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport) + +Ref: Clean Code, Robert C. Martin, J2: Don't Inherit Constants +Recommends using a static import to access constants from another class over inheriting them. #### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable) Doesn't recognise Lombok's `val` as being `final`. diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index 5920a78..c62a87b 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -103,6 +103,7 @@ rules: level: LAYOUT enabled: false source: CHECKSTYLE + reason: "Ref: Clean Code, Robert C. Martin, J1: Avoid Long Import Lists by Using Wildcards" uri: http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport - name: AvoidStaticImport @@ -110,6 +111,9 @@ rules: level: COMPLEXITY enabled: false source: CHECKSTYLE + reason: "Ref: Clean Code, Robert C. Martin, J2: Don't Inherit Constants + + Recommends using a static import to access constants from another class over inheriting them." uri: http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport properties: excludes: org.assertj.core.api.Assertions.assertThat,org.mockito.BDDMockito.given,org.mockito.Mockito.*,org.mockito.Matchers.*,org.mockito.Mockito.* diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml index 8b69e34..4c5422e 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml @@ -22,7 +22,6 @@ - diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml index 330545e..8b7de69 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml @@ -25,7 +25,6 @@ - diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml index 00f2043..51a0531 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml @@ -31,7 +31,6 @@ - @@ -51,9 +50,7 @@ - - - + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml index 0358887..d9dbcb1 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml @@ -34,7 +34,6 @@ - @@ -78,9 +77,7 @@ - - - + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml index e3a5f44..87eebaa 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml @@ -38,10 +38,6 @@ - - - - @@ -99,9 +95,7 @@ - - - +