Release notes
5.0.0 (2024-02-01)¶
- (BREAKING) Drop gradle 5 and 6 support
- Update spotbugs plugin to 5.2.5 (#94)
- Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore
- Custom xsl file is not used for html report - native html report generation used instead
- Add spotbugs-annotations dependency automatically with compileOnly (to simplify @SuppressFBWarnings usage) Could be disabled with quality.spotbugsAnnotations = false configuration
- Update checkstyle 10.6.0 -> 10.12.7 (gradle metadata fix applied)
- Fix links to checkstyle site (site structure changed)
- Update spotbugs 4.7.3 -> 4.8.3
- Update pmd 6.54 -> 6.55 (java 20 support)
- Update codenarc 3.2.0 -> 3.4.0
- Remove deprecated gradle apis usage
- The plugin is still NOT compatible with configuration cache
4.9.0 (2023-02-18)¶
- Gradle 8 support (#77)
- Update checkstyle 10.3.1 -> 10.6.0
- Update pmd 6.47 -> 6.54 (java 19 support)
- Update pmd config:
- Disable TestClassWithoutTestCases
- Rename excluded rule BeanMembersShouldSerialize to NonSerializableClass
- Update spotbugs 4.7.1 -> 4.7.3
- Update codenarc 3.1.0 -> 3.2.0
- Fix codenarc for groovy4 support: change to x.x-groovy-4.0 version instead of codenarc-groovy4 artifact
4.8.0 (2022-07-02)¶
- Update checkstyle 9.1 -> 10.3.1 IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to backports for lower jre. Additional maven repository would be registered if required (LIMITED to checkstyle only) Warning in log would clearly indicate when backport is used
- New option: quality.checkstyleBackport (by default true for jre < 11) Option might be used to force backport for java >=11 or to disable backport at all
- Update checkstyle config:
- Add UnusedLocalVariable
- Change MultipleStringLiterals to react on strings more than 2 chars only and allow 2 duplicates (to avoid warning in trivial cases)
- Update pmd 6.34 -> 6.47 (java 17-18 support)
- Update pmd config:
- Disable AvoidAccessibilityAlteration
- Change CognitiveComplexity reportLevel to 21 (default 15)
- Disable ReturnEmptyArrayRatherThanNull as deprecated
- Update codenarc 2.2.0 -> 3.1.0 (groovy 4 support)
- New option: quality.codenarcGroovy4 (by default, true) Since codenarc 3.1 separate groovy4-based codenarc jar produced (codenarc-groovy4) It would be used by default because groovy 4 has better adoption for newer JDKs (codenarc task started with its own groovy so it does not restrict gradle version) If you need to use older codenarc version then switch this option off manually
- Update spotbugs 4.4.2 -> 4.7.1
- Update spotbugs plugin 4.7.9 -> 4.8.0
4.7.0 (2021-11-10)¶
- Fix gradle 7 deprecation warnings (#30)
- Update spotbugs plugin 4.7.1 -> 4.7.9 (maven group changed: gradle.plugin.com.github.spotbugs.snom -> com.github.spotbugs.snom)
- Add spotbugsShowStackTraces option with default to false. Option introduced to change the default for spotbug's showStackTraces option to avoid additional stacktrace in logs in non-strict mode (when plugin not fails on errors)
- Update spotbugs 4.2.3 -> 4.4.2
- Update spotbugs exclusions:
- Exclude EI_EXPOSE_REP due to confusing false positives
- Exclude EI_EXPOSE_REP2 due to confusing false positives
- Update codenarc 2.1.0 -> 2.2.0
- Deprecate quality.pmdIncremental property because incremental analysis is enabled by default since gradle 6.4 (property only useful for enabling it in gradle 5.6 - 6.3)
- Update checkstyle 8.42 -> 9.1
- Update checkstyle config:
4.6.0 (2021-05-01)¶
- Fix gradle 7 compatibility (for checkstyle plugin)
- Fix console output on windows (remove special unicode separator characters, appearing incorrectly)
- Update checkstyle 8.39 -> 8.42
- Update checkstyle config:
- Add RecordComponentName
- Disable Indentation as causing problems too often (currently in regression since 8.40)
- Disable UnnecessaryParentheses due to often false complains in if statements (especially many misses in 8.42)
- Update pmd 6.31 -> 6.34 (java 16 support)
- Update pmd config:
- Disable deprecated UnusedImports, DuplicateImports, ImportFromSamePackage, DontImportJavaLang (replaced by new UnnecessaryImport rule)
- Update spotbugs 4.2.1 -> 4.2.3
- Update spotbugs plugin 4.6.0 -> 4.7.1
- Update codenarc 2.0.0 -> 2.1.0
4.5.0 (2021-02-06)¶
- Fix report separating lines disappear in intellij IDEA output (appears when gradle output recognized as junit test output). Extra zero-width space symbol used to prevent trims.
- Update checkstyle 8.36.2 -> 8.39 (not 8.40 due to Indentation check regression)
- Update checkstyle config:
- Add JavadocMissingLeadingAsterisk
- Disable LambdaBodyLength as method length check is enough
- Add optional external suppressions file support: just create gradle/config/checkstyle/suppressions.xml and it will be used automatically with the default config
- Update pmd 6.28 -> 6.31
- Update pmd config:
- Remove AvoidInstantiatingObjectsInLoops because its useless most of the time
- Remove AssignmentInOperand because its quite common technique
- Remove AvoidUsingVolatile because it's not an issue but attention pointer
- Update NcssCount methodReportLevel from 30 to 40, classReportLevel from 300 to 500
- Update spotbugs 4.1.3 -> 4.2.1
- Update spotbugs plugin 4.5.1 -> 4.6.0
- Set checkstyle.configDirectory property: required for ${config_loc} variable (#29)
4.4.0 (2020-10-11)¶
- Update codenarc 1.5 -> 2.0.0 (groovy 3 and java 14 support, requires java 7)
- Update codenarc config:
- Disable new rule ImplicitReturnStatement because it will cause too many warnings on typical projects and sometimes don't see existing return
- Update pmd 6.23 -> 6.28 (java 15 support, text block syntax)
- Update checkstyle 8.32 -> 8.36.2 (java 14 records support, text block syntax)
- Update checkstyle config
- Add NoCodeInFile
- Add IllegalIdentifierName
- Add RecordComponentNumber
- Add RecordTypeParameterName
- Add PatternVariableName
- Update spotbugs 4.0.3 -> 4.1.3
- Update spotbugs plugin 4.1.0 -> 4.5.1
- Fix exclusions apply for spotbugs (#27)
- Automatically exclude apt-generated sources for spotbugs (apt processor(s) assumed to be specified with annotationProcessor configuration)
4.3.0 (2020-05-13)¶
- Update spotbugs plugin to 4.1.0 (#26)
- Fixes gradle 6.4 compatibility.
- The new plugin is a re-write of the original spotbugs plugin. But quality plugin makes it work as before, so you shouldn't see any difference.
- Minimal supported gradle is now 5.6 (due to spotbugs plugin)
- New spotbugs plugin can generate html report itself, but this option is not used
- Update spotbugs 4.0.2 -> 4.0.3
- Update checkstyle 8.31 -> 8.32
- Update checkstyle config:
- Update pmd 6.22 -> 6.23
NOTE: * New spotbugs plugin does not support build cache (https://github.com/spotbugs/spotbugs-gradle-plugin/issues/244) * Spotbugs task always show an exception when violations found (not a problem, just confusing)
4.2.2 (2020-04-23)¶
- Remove spotbugs configuration "tuning" (added in the last version) because it eventually works incorrectly (causing warnings). Spotbugs 4.0.2 depends on slf4j 1.8 which should avoid compatiblity problems (at least for some time).
4.2.1 (2020-04-16)¶
- Update spotbugs 4.0.1 -> 4.0.2
- Revert (and change) spotbugs configuration customizations:
- Remove explicit asm dependency for "spotbugs" configuration It was added by mistake: dependency-management plugin applied for all configurations was actually guilty of incorrect asm version (case description added to documentation)
- Force correct version of sl4j-simple instead of removing dependency (nasty warnings introduced in previous release will disappear now)
Warnings from the previous version are no more actual (except new plugin version (4)).
4.2.0 (2020-04-15)¶
- Fix gradle configuration fail: "Cannot access last() element from an empty List" (project with explicit quality configuration fails to open in the new IDEA)
- Fix concurrent default configs initialization clash (#22)
- Update spotbugs 3.1.12 -> 4.0.1
- Spotbugs classpath changes ("spotbugs" configuration):
- Removed
sl4j-simple
dependency: you will see default slf4j warnings but everything will work in all cases and will no more fail due to sl4j version class with gradle's own sl4j (#20) asm
7.3.1 is directly specified to force 7.3.1 because otherwise gradle (5.6) downgrades it to 7.2 (which leads to execution fails "no class def found").
- Removed
- Update codenarc 1.4 -> 1.5
- Update codenarc config:
- Disable new rule ImplicitClosureParameter
- Fix codenarc link in console report (docs moved from sourceforge to github)
- Update checkstyle 8.29 -> 8.31
- Update checkstyle rules:
- New rule UnnecessarySemicolonAfterOuterTypeDeclaration
- Disable new rule AvoidDoubleBraceInitialization
- Update NewlineAtEndOfFile lineSeparator configuration to default (lf_cr_crlf) because rule fixed in 8.30 and now may cause too many violations
- Fix checkstyle link in console report (sourceforge.net changed to sourceforge.io to avoid redirect)
- Update pmd 6.21 -> 6.22
WARNING (spotbugs related):
1. If you want to downgrade spotbugs version (with quality.spotbugsVersion = ..
) then you'll have
to also force correct asm version on spotbugs configuration.
2. If you need to see spotbugs logs, then manually add slf4j-simple
dependency to spotbugs configuration.
(normally, spotbugs logs are not important and removing dependency fixes some environments)
3. If you don't want to see sl4j default warnings then simply put slf4j-nop
dependency into spotbugs
configuration. I can't do it automatically because I may introduce new sl4j compatibility problems due to incorrect version.
4. I know, there is a new spotbugs plugin 4.0.5,
but it is conceptually different, so old version would be used for some time. (I tried to upgrade, but it requires time to resolve all issues)
5. BUT with all this, spotbugs 4 should work without problems for everyone!
4.1.0 (2020-02-15)¶
- Fix disabled plugin execution with no-tasks gradle run (pure initialization) (#21)
- Update checkstyle 8.26 -> 8.29
- Update checkstyle config:
- Update pmd 6.17.0 -> 6.21.0
- Update pmd config:
- Disabled rule
InvalidSlf4jMessageFormat
name changed toInvalidLogMessageFormat
- Disabled rule
4.0.0 (2019-11-16)¶
- Gradle 6.0 compatibility
- (breaking) Removed findbugs plugin support because it was removed in gradle 6
- (breaking) Minimal required gradle is now 5.1
- Update spotbugs 3.1.11 -> 3.1.12
- Update com.github.spotbugs plugin: 1.6.5 -> 2.0.1
- Note that plugin group changed: gradle.plugin.com.github.spotbugs -> com.github.spotbugs
- Add spotbugs-related options:
- spotbugsMaxHeapSize setting may be used to increase default spotbugs memory (reduced to 512mb in gradle 5). Option does not override maxHeapSize manually set on spotbugs task (to not break working builds) (#12)
- spotbugsMaxRank setting allows to filter low-ranked rules (ranks are different from priorities!) (#15) Option modifies excludes.xml file (the only way to apply rank threshold)
- spotbugsPlugin shortcut method to simplify plugins declaration (without afterEvaluate block or manual spotbugs plugin declaration)
- Spotbugs console report changes:
- Show both rule rank and priority :
[priority 2 / rank 14]
- Identify rules from plugins:
[fb-contrib project | Correctness | FCBL_FIELD_COULD_BE_LOCAL]
- Show both rule rank and priority :
- Update codenarc 1.3 -> 1.4
- Update checkstyle 8.17 -> 8.26
- Update checkstyle config:
- Disable TrailingComment
as not useful and contradicting with PMD suppression syntax (
// NOPMD
) - Add new checks:
- Disable new checks:
- Disable TrailingComment
as not useful and contradicting with PMD suppression syntax (
- Update pmd 6.11.0 -> 6.17.0
NOTE: 6.18 or 6.19 can't be used due to regression (should be fixed in 6.20) - Update pmd config:
- Add 1 as allowed "magic number" for AvoidLiteralsInIfCondition
- Disable new rule AvoidUncheckedExceptionsInSignatures because it produces false positives for implemented interfaces (and generally not useful)
- Remove
java.lang.AutoCloseable
in CloseResource rule because it produces too many false positives
- Add
pmdIncremental
option - shortcut for gradle'spmd.incrementalAnalysis
option. Disabled by default. - Add PMD's CPD tool support through de.aaschmid.cpd plugin. (#4)
- CPD gradle plugin must be applied manually: no automatic plugin enabling
- Sets pmd version and silent mode.
- Sources configured according to quality configuration. Exclusions (source and pattern) are supported too
- Html report generated (using style recommended by pmd; style file added as overridable config)
- Full console report (like for other quality plugins)
- Support for multi-module projects (where cpd plugin applied in root project and quality in subprojects)
- Use gradle configuration avoidance to prevent not used quality tasks creation
- Use
compilerArgumentProviders
instead of direct options modification (JavaCompile.options.compilerArgs
) to workaround possible immutable list usage in options (#19)
3.4.0 (2019-02-16)¶
- Fix source files root detection (#13)
- Set spotbugs tasks default heap size to 1g to mimic old behaviour in gradle 5 (#12)
- Update pmd 6.9.0 -> 6.11.0
- Update checkstyle 8.14 -> 8.17
- Update spotbugs 3.1.9 -> 3.1.11
- Update codenarc 1.2.1 -> 1.3
- Update codenarc config:
- Add new ruleset Comments
- Disable new rule ClassStartsWithBlankLine
- Disable new rule ClassEndsWithBlankLine
3.3.0 (2018-11-23)¶
- Update pmd config:
- Allow camel cased enum constants for FieldNamingConventions
- Update spotbugs 3.1.6 -> 3.1.9
- Update com.github.spotbugs plugin 1.6.3 -> 1.6.5
- Update checkstyle 8.12 -> 8.14
- Update pmd 6.7.0 -> 6.9.0
3.2.0 (2018-09-11)¶
- Gradle 4.10 compatibility:
- updated com.github.spotbugs plugin 1.6.2 -> 1.6.3
- Update checkstyle 8.11 -> 8.12
- Update pmd 6.5.0 -> 6.7.0
- Update codenarc 1.2 -> 1.2.1
3.1.1 (2018-07-22)¶
- Fix maven central and jcenter artifacts (missed dependency) (#9)
- Update spotbugs 3.1.5 -> 3.1.6
3.1.0 (2018-07-13)¶
- Gradle 4.8 compatibility:
- updated com.github.spotbugs plugin 1.6.1 -> 1.6.2
- fix exclusions support
- Update checkstyle 8.8 -> 8.11
- Update checkstyle config:
- New check LambdaParameterName
- Update pmd 6.1.0 -> 6.5.0
- Update pmd config:
- Disable ClassNamingConventions
- Update spotbugs 3.1.2 -> 3.1.5
- Update codenarc 1.1 -> 1.2
- Update codenarc config:
- Disable new check NoJavaUtilDate
- Option to disable html reports: quality.htmlReports=false (#5)
3.0.0 (2018-03-25)¶
- Update codenarc 1.0 -> 1.1
- Update checkstyle 8.2 -> 8.8
- Update pmd 5.8.1 -> 6.1.0
- Update pmd config:
- (breaking) All rules reordered according to new groups
- Disable CommentDefaultAccessModifier as not useful
- Disable ExcessiveClassLength and ExcessiveMethodLength in favor of new rule NcssCount (which counts lengths without empty lines and comments)
- Defaults for NcssCount (which counts length without empty lines and comments) changed: 30 lines for method and 300 for class (with previous Excessive* rules it was 50 and 500 accordingly)
- Disable new rule DataClass as too strict for general cases
- Switch from ModifiedCyclomaticComplexity (deprecated) to CyclomaticComplexity with ignoreBooleanPaths option
- (breaking) use Spotbugs (3.1.2) instead of Findbugs by default (as successor)
- com.github.spotbugs external plugin applied (quality plugin brings it as a dependency)
- Spotbugs plugin will use configs from different folder (spotbugs/), so if custom findbugs configs were used move them to spotbugs/ folder
- Findbugs support is deprecated and will be removed someday (but not soon).
- To use findbugs (as before): disable spotbugs support (quality.spotbugs = false) or enable findbugs plugin manually (in this case spotbugs plugin will not be registered)
- Update spotbugs exclusions:
- Exclude NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION check as it prevents @Nullable override, which may be required for guava functions
- Exclude NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE check as misleading and not useful
2.4.0 (2017-09-21)¶
- Support gradle 4.2 (#3)
- Update checkstyle 8.0 -> 8.2
- Update codenarc 0.27.0 -> 1.0
- Update checkstyle config:
- Move SuppressionCommentFilter inside TreeWalker (8.1 breaking change)
- Remove FileContentsHolder (8.2 breaking change)
- New check AnnotationOnSameLine (added in 8.2) added to config, but disabled
2.3.0 (2017-07-24)¶
- Update checkstyle 7.6 -> 8.0
- Update pmd 5.5.4 -> 5.8.1
- Update pmd config:
- Add description to avoid warning
- Disable AccessorMethodGeneration check as it makes sense for android projects and not so important for java. Moreover, possible fixes will contradict with checkstyle's VisibilityModifier
2.2.0 (2017-03-21)¶
- Update checkstyle 7.4 -> 7.6
- Update pmd 5.5.2 -> 5.5.4
- Update codenarc 0.26.0 -> 0.27.0
- Update pmd config:
- Disable NullAssignment check due to false positives
- Add unified exclusion patterns (glob) configuration: exclude (#2)
- Does not affect animalsniffer because it's a different type of check
- Findbugs did not support direct exclusions, so plugin resolves excluded classes and adds them to exclusion xml (default or user defined)
- Add configuration to directly exclude source files from check (for exceptional cases when pattern exclusion cant help): excludeSources
- Does not affect animalsniffer
- For findbugs excluded classes will be added to exclusions xml filter
2.1.0 (2017-01-24)¶
- Update checkstyle 7.1 -> 7.4
- Update pmd 5.5.1 -> 5.5.2
- Update codenarc 0.25.2 -> 0.26.0
- Update pmd config:
- Disable junit4 migration rules which cause false positives for non test code: JUnit4TestShouldUseBeforeAnnotation, JUnit4TestShouldUseAfterAnnotation, JUnit4TestShouldUseTestAnnotation
2.0.0 (2016-09-03)¶
- Update checkstyle 6.17 -> 7.1 (requires min jdk 8)
- Update checkstyle config:
- Add SingleSpaceSeparator check (since 6.19)
- Disable FileLength check in favour of more correct PMD ExcessiveClassLength check (which checks actual class length not file)
- Enable ReturnCount to replace pmd OnlyOneReturn check
- Update pmd 5.4.1 -> 5.5.1 (requires min jdk 7)
- Update pmd config:
- Disable UselessParentheses because of too many false positives
- Disable OnlyOneReturn in favour of checkstyle ReturnCount
- Disable InvalidSlf4jMessageFormat due to known bug
- Disable CyclomaticComplexity and StdCyclomaticComplexity as duplicate rules for ModifiedCyclomaticComplexity
- Update codenarc 0.25.1 -> 0.25.2
- (breaking) quality.lintOptions configuration now applies to all JavaCompile tasks (not only to compileJava as before)
- Fix multi-module projects reporting (remove duplicate reports)
- Fix generated html reports links (redundant slash on linux)
- Fix newline in reporters (use platform specific)
- Change reporting format so intelliJ IDEA can recognize class reference and show link (eclipse will probably too). Reference line ranges are not shown anymore (pmd, findbugs and column in checkstyle) - always exact line.
- (breaking) configure manually registered plugins, even if plugin not supposed to be used due to sources auto detection. Configuration may be disabled using quality configuration flags.
- Add ability to disable automatic plugins registration: quality.autoRegistration = false. Only manually registered plugins will be configured.
- Add ability to disable quality tasks with configuration property: quality.enabled = false. Quality tasks will still work if called directly or through grouping task (e.g. checkQualityMain).
- (breaking) Remove checkstyle html report generation: gradle can generate html report since 2.10 and when gradle generates html report, it puts link to it into main error message
- Findbugs html report is always generated (not only when errors found like before)
- Add ability to disable console reporting with configuration property: quality.consoleReporting = false
- Add grouping tasks for registered quality plugins: checkQualityMain, checkQualityTest (per source set). Allows running quality tasks for exact source set or run quality tasks not enabled for 'check' task.
1.3.0 (2016-03-30)¶
- Update checkstyle 6.14.1 -> 6.17
- Update codenarc 0.24.1 -> 0.25.1
- Disable default checkstyle html report (enabled in gradle >=2.10) to avoid duplicate report generation
- Add reporting execution time logging (visible with --info option)
- Update default checkstyle config:
- Disable Misc/UncommentedMain
1.2.0 (2016-01-01)¶
- Update default configs:
- Disable Pmd/Controversial/AvoidFinalLocalVariable
- Pmd/Design/AvoidDeeplyNestedIfStmts default set to 4
- Checkstyle/Coding/NestedIfDepth default set to 3
- Add disabled check in config Checkstyle/Naming/CatchParameterName
- Update checkstyle 6.13 -> 6.14.1
1.1.1 (2015-12-24)¶
- Fix AnimalSniffer version configuration
1.1.0 (2015-12-21)¶
- Add ru.vyarus.animalsniffer plugin configuration support
- Improve FindBugs console output
1.0.3 (2015-12-11)¶
- Delay default configs copying to actual task execution to avoid problems with clean task
1.0.2 (2015-12-06)¶
- Unescape CodeNarc messages
- Update checkstyle 6.12.1 -> 6.13
- Update pmd 5.4.0 -> 5.4.1
1.0.1 (2015-12-04)¶
- Don't activate CodeNarc if groovy plugin enabled but no groovy sources folder exists
1.0.0 (2015-11-19)¶
- Initial release