Skip to content

Commit

Permalink
update codenarc, pmd, spotbugs, checkstyle;
Browse files Browse the repository at this point in the history
add checkstyle rule NoWhitespaceBeforeCaseDefaultColon;
disable EI_EXPOSE_REP and EI_EXPOSE_REP2 spotbugs checks
  • Loading branch information
xvik committed Nov 8, 2021
1 parent c2ee668 commit f6391dc
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@
* 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](https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#ei-may-expose-internal-representation-by-returning-reference-to-mutable-object-ei-expose-rep)
due to confusing false positives
- Exclude [EI_EXPOSE_REP2](https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html#ei2-may-expose-internal-representation-by-incorporating-reference-to-mutable-object-ei-expose-rep2)
due to confusing false positives
* Update codenarc 2.1.0 -> 2.2.0
* Update pmd 6.34 -> 6.40 (java 17 support)
* 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:
- Add [NoWhitespaceBeforeCaseDefaultColon](https://checkstyle.sourceforge.io/config_whitespace.html#NoWhitespaceBeforeCaseDefaultColon)

### 4.6.0 (2021-05-01)
* Fix gradle 7 compatibility (for checkstyle plugin)
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ mkdocs {
}
extras = [
'version': project.docVersion,
'checkstyle': '8.42',
'pmd': '6.34.0',
'spotbugs': '4.2.3',
'codenarc': '2.1.0',
'checkstyle': '9.1',
'pmd': '6.40.0',
'spotbugs': '4.4.2',
'codenarc': '2.2.0',
'spotbugsPlugin': project.spotbugsPluginVersion,
'cpd': project.cpdVersion,
'animalsnifferPlugin': project.animalsnifferVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class QualityExtension {
sourceSets = [project.sourceSets.main] as Collection<SourceSet>
}

String checkstyleVersion = '8.42'
String checkstyleVersion = '9.1'
String pmdVersion = '6.34.0'
String spotbugsVersion = '4.2.3'
String codenarcVersion = '2.1.0'
String spotbugsVersion = '4.4.2'
String codenarcVersion = '2.2.0'

/**
* Sets AnimalSniffer version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="NoWhitespaceBeforeCaseDefaultColon"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="SeparatorWrap">
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/ru/vyarus/quality/config/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
<!-- Disabled as confusing check (very misleading description) and also not so useful -->
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<Match>
<!-- Disabled as confusing check (very misleading description) and also not so useful -->
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>
<Match>
<!-- Disabled due to confusing false positives -->
<Or>
<Bug pattern="EI_EXPOSE_REP"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Or>
</Match>


<!-- Do not check class -->
Expand Down

0 comments on commit f6391dc

Please sign in to comment.