tibi wrote:
>
> i'm used to use checkstyle and pmd to push on writing nice code.
> ...
> i already added the request to the google summer school list.
>
i will put here parts of my pom file. just as a start:
first it is very irritating to not be able to build when there is some
stupid checkstyle error. which is the whole point of this. but i need a
backdore so i have this propertie:
<failsOnError>true</failsOnError>
with the -DfailsOnError=false option you can always build (handy for a
continues integration server with mvn site -DfailsOnError=false to see the
errors)
checkstyle is this in report section:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>
<!-- config/sun_checks.xml
${basedir}/doc/checkstyle-checker.xml
-->
https://appfuse.dev.java.net/checkstyle.xml
</configLocation>
<failsOnError>${failsOnError}</failsOnError>
</configuration>
</plugin>
pdm is this in report section:
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<linkXref>true</linkXref>
<targetJdk>1.5</targetJdk>
</configuration>
</plugin>
and you need this in the build section:
<!-- check and fail on the pmd reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
en cobertura:
<!-- Fail if there are not enough tests -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<check>
<branchRate>85</branchRate>
<lineRate>85</lineRate>
<haltOnFailure>${failsOnError}</haltOnFailure>
<!-- <totalBranchRate>85</totalBranchRate>-->
<!-- <totalLineRate>85</totalLineRate>-->
<!-- <packageLineRate>85</packageLineRate>-->
<!-- <packageBranchRate>85</packageBranchRate>-->
<regexes>
<regex>
<pattern>nl.tryllian.aperture.example.*</pattern>
<branchRate>50</branchRate>
<lineRate>80</lineRate>
</regex>
</regexes>
</check>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
--
View this message in context:
http://www.nabble.com/checkstyle-and-PMD-errors-tp22666672s2369p22678409.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net