SweatSuite is pre-configured with numerous reports. To generate these reports, run Maven with the "reporting" profile:
mvn site -P reporting
The default reports include:
The default code quality reports are highly customizable. You can control them at a coarse level using the report-configuration and report-threshold properties. The report threshold property selects a group of preconfigured report settings available at the sweatSuite web site. The report configuration property controls the base URL of the preconfigured settings, so that you can use a local set of standards rather than the generic ones provided. The preconfigured report thresholds are:
Inevitably, the more strict the preconfigured reports, the more controversial they become. There are Eclipse settings that implement formatting choices consistent with the reports. With a custom report-configuration URL, the settings can be replaced completely. In that case, you can choose to use the same values for report-threshold or select names more appropriate to your situation.
For finer-grained control over the report configuration, the plugin settings can be overridden by the project POM. To override the Checkstyle configuration, specify an alternate value for the checkstyle-configuration property. To override the PMD configuration, specify an alternate value for the pmd-ruleset property.
PMD does not have the ability to specify a separate suppressions filter. Instead, use a NOPMD trailing comment on the specific lines where the warning should be suppressed. When using strict style checking, warnings about these comments will then have to be suppressed in Checkstyle.
Checkstyle has a suppressions filter that can be used to suppress specific output. By default, the report configuration points to an empty filter. To enable a project-specific suppressions filter, override the checkstyle-suppressions property.
The strict checking configuration includes warnings not to use trailing comments. If there are NOPMD comments, warnings about them can be suppressed as follows:
<!-- Suppress directives to PMD --> <suppress checks="TrailingComment" files="Some.java" lines="148" />
To suppress warnings in FindBugs, use the excludeFilterFile configuration parameter. Due to the way Maven inherits property values from profiles, if the child POM specifies an excludeFilterFile it may also be necessary to respecify the threshold and effort properties.
<reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <configuration> <excludeFilterFile>${basedir}/findbugs_suppressions.xml</excludeFilterFile> <threshold>High</threshold> <effort>Default</effort> </configuration> </plugin> </plugins> </reporting>