Today I decide to share my Sonar Source ruleset that I use for JavaFX 2.0 project (JRebirth.org), because global quality greatly depends on rules used.
My Sonar instance is accessible here quality.jrebirth.org
Recently I update the default ruleset and the quality index decrease from 98.7% to only 10% !
Here you can see the project timeline view which illustrate well the impact of the new ruleset !!
- At Least One Constructor - Pmd
Sometimes it could be a waste of time to write empty default constructor.
- Bean Members Should Serialize - Pmd
Sometimes we don't want to provide a setter, (workaround is to set the property transient, but every object is not a bean specifically in UI)
- Default Package - Pmd
it could be useful to reduce visibility to current package, to not share public API
- Header - Checkstyle
- Illegal Catch - Checkstyle
In order to manage Jdk7 Multicatch
- Javadoc Package - Checkstyle
Who write javadoc for package in a dedicated file ?
- Magic Number - Checkstyle
When writing UI there is a lot of magic numbers needed.
- Missing Constructor - Checkstyle
See above At Least One Constructor
- Regexp - Checkstyle
- Regexp Header - Checkstyle
- Regexp Multiline - Checkstyle
- Regexp Singleline - Checkstyle
- Regexp Singleline Java - Checkstyle
- Short Variable - Pmd
When I work with a bean named Car I'm used to name variable c, to be homogenous with long name like NotificationType nt
- XPath rule template - Pmd
Let me know what do you think about them !
Later I will share my dedicated xml configuration files for CheckStyle, Pmd and FindBugs