[JAVA] PMD/Checkstyle and corresponding SQUID rules

154 views
Skip to first unread message

Adam Gabryś

unread,
Nov 15, 2015, 1:34:45 PM11/15/15
to SonarQube
Hi,
I found some PMD/Checkstyle rules which can be deprecated by SQUID rules:
 
1) JUnit assertions should include a message
- pmd-unit-tests:JUnitAssertionsShouldIncludeMessage
- squid:S2698
 
2) Javadoc Package
- checkstyle:com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck
- squid:S1228
 
3) Confusing Ternary
- pmd:ConfusingTernary
- squid:S1774
 
4) Regexp Header
- checkstyle:com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck
- squid:S1451
 
________________________
And incorrect deprecations:
 
1) Default Package
- pmd:DefaultPackage (visibility modifier)
- squid:S1220 (default package name)
 
Regards,
    Adam Gabryś

Michael Gumowski

unread,
Nov 16, 2015, 6:01:40 AM11/16/15
to Adam Gabryś, SonarQube
Hey Adam,

Thanks for the feedback.

Regarding PMD, I deprecated pmd-unit-tests:JUnitAssertionsShouldIncludeMessage in favor of squid:S2698, but I will not deprecate ConfusingTernary. Our rule totally forbid usage of ternary operator, which is not the case of the rule from PMD, as it only target negative Boolean expression. I also removed the deprecation of the DefaultPackage rule from PMD, as it is indeed not the same case handled. [commit: 0cd0a88e72618f4aef268478922a9b92e38ae65f]

Regarding Checkstyle, I deprecated the two related rules! [commit: 36158cf903b586f3765285f69776f75f4d50f0ac]

Regards,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/DUB124-DS14B8A752AE5E66F9128F40981F0%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages