Adding a Checkstyle configuration file and enabling it in the mvn2 build.
This checkstyle configuration will check for missing/invalid javadoc or missing license (Already 5000 erros to correct with only those !) Also added xref and javadoc generation in mvn2 build. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5918 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
parent
ceab009812
commit
1ccaebd29e
60
pmd/etc/checkstyle-config.xml
Normal file
60
pmd/etc/checkstyle-config.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
<module name="Checker">
|
||||
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
<!-- JDocPackage
|
||||
TODO: I don't know if this one is really relevant
|
||||
<module name="PackageHtml">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
-->
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<!-- RegexpHeader -->
|
||||
<!--
|
||||
Assert if header is :
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
-->
|
||||
<module name="RegexpHeader">
|
||||
<property
|
||||
name="header"
|
||||
value="^\/\*\*[ ]*$\n^[ ]+\*[ ]+BSD-style license; for more info see http:\/\/pmd.sourceforge.net/license.html[ ]*\n[ ]+\*\/[ ]*$"/>
|
||||
</module>
|
||||
|
||||
<!-- JDocHtmlValid, JDocHeader -->
|
||||
<module name="JavadocStyle">
|
||||
<property name="checkFirstSentence" value="false"/>
|
||||
<property name="checkEmptyJavadoc" value="true"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- JDocHeader -->
|
||||
<module name="JavadocType">
|
||||
<property name="versionFormat" value="\S"/>
|
||||
<property name="authorFormat" value="\S"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<!-- JDocMethod-1, JDocMethod-3, JDocException-1 -->
|
||||
<module name="JavadocMethod">
|
||||
<property name="severity" value="error"/>
|
||||
<property name="scope" value="package"/>
|
||||
</module>
|
||||
|
||||
<!-- JDocMethod-1 -->
|
||||
<module name="JavadocVariable">
|
||||
<property name="severity" value="error"/>
|
||||
<property name="scope" value="package"/>
|
||||
</module>
|
||||
|
||||
<!-- AvoidStarImport -->
|
||||
<module name="AvoidStarImport">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
32
pmd/pom.xml
32
pmd/pom.xml
@ -290,17 +290,33 @@
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<configuration>
|
||||
<linkXref>true</linkXref>
|
||||
<sourceEncoding>utf-8</sourceEncoding>
|
||||
<minimumTokens>100</minimumTokens>
|
||||
<targetJdk>1.5</targetJdk>
|
||||
<rulesets>
|
||||
<ruleset>http://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd/rulesets/internal/dogfood.xml</ruleset>
|
||||
</rulesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<linkXref>true</linkXref>
|
||||
<sourceEncoding>utf-8</sourceEncoding>
|
||||
<minimumTokens>100</minimumTokens>
|
||||
<targetJdk>1.5</targetJdk>
|
||||
<rulesets>
|
||||
<ruleset>http://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd/rulesets/internal/dogfood.xml</ruleset>
|
||||
</rulesets>
|
||||
<configLocation>etc/checkstyle-config.xml</configLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
Loading…
x
Reference in New Issue
Block a user