Use new pmd-build plugin, adjust some rule documentation for markdown changes

This commit is contained in:
Andreas Dangel
2015-03-15 14:59:55 +01:00
parent d17786000f
commit dd6affeb6e
15 changed files with 33 additions and 158 deletions

11
.gitignore vendored
View File

@ -9,11 +9,6 @@ bin/
*.iml
.idea
*.patch
pmd-java/src/site/site.xml
pmd-javascript/src/site/site.xml
pmd-jsp/src/site/site.xml
pmd-plsql/src/site/site.xml
pmd-vm/src/site/site.xml
pmd-xml/src/site/site.xml
*/src/site/xdoc/rules
*/src/site/xdoc/mergedruleset.xml
*/src/site/site.xml
*/src/site/markdown/rules
*/src/site/markdown/mergedruleset.xml

View File

@ -66,14 +66,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -68,10 +68,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
@ -104,20 +104,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -308,10 +308,10 @@ or MethodDeclaration[@PackagePrivate='true']
**Note:** This rule is deprecated as nowadays the JVMs JIT compilers will optimize away the differences.
While the bytecode generated by the java compiler is indeed different, at runtime the instructions
are optimized to the fastest way automatically.
See <https://sourceforge.net/p/pmd/bugs/1277/> for more details.
See [#1277](https://sourceforge.net/p/pmd/bugs/1277/) for more details.
Use bitwise inversion to invert boolean values - it's the fastest way to do this.
See <http://www.javaspecialists.eu/archive/Issue042.html> for specific details
See [Java Specialists - Issue 042](http://www.javaspecialists.eu/archive/Issue042.html) for specific details.
]]>
</description>
<priority>3</priority>

View File

@ -35,20 +35,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
@ -60,10 +46,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>

View File

@ -57,10 +57,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
@ -93,20 +93,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -91,7 +91,7 @@ response.setHeader("Pragma", "No-cache");
class="net.sourceforge.pmd.lang.jsp.rule.basic.NoInlineStyleInformationRule"
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineStyleInformation">
<description><![CDATA[
Style information should be put in CSS files, not in JSPs. Therefore, don't use <B> or <FONT> tags, or attributes like "align='center'". ]]>
Style information should be put in CSS files, not in JSPs. Therefore, don't use &lt;B> or &lt;FONT> tags, or attributes like "align='center'". ]]>
</description>
<priority>3</priority>
<example>
@ -267,10 +267,8 @@ and
message="Avoiding inlining HTML script content"
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineScript">
<description>
<![CDATA[
Avoid inlining HTML script content. Consider externalizing the HTML script using the 'src' attribute on the <script> element.
Avoid inlining HTML script content. Consider externalizing the HTML script using the 'src' attribute on the "script" element.
Externalized script could be reused between pages. Browsers can also cache the script, reducing overall download bandwidth.
]]>
</description>
<priority>3</priority>
<properties>

View File

@ -66,14 +66,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -66,14 +66,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -57,10 +57,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
@ -93,20 +93,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -66,14 +66,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -56,15 +56,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -57,10 +57,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>
@ -93,20 +93,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -35,20 +35,6 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<configuration>
<rulesetsDirectory>${basedir}/src/main/resources/rulesets</rulesetsDirectory>
<siteXml>${basedir}/src/site/site.pre.xml</siteXml>
<siteXmlTarget>${basedir}/src/site/site.xml</siteXmlTarget>
<target>${basedir}/src/site/xdoc/rules</target>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
@ -60,10 +46,10 @@
<phase>clean</phase>
<configuration>
<target>
<echo>PMD specific tasks: cleaning generated xdocs</echo>
<echo>PMD specific tasks: cleaning generated markdown</echo>
<delete quiet="true">
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
<fileset dir="${basedir}/src/site/" includes="site.xml" />
</delete>
</target>

View File

@ -398,7 +398,14 @@
<plugin>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-build</artifactId>
<version>0.8</version>
<version>0.9-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>pmd-pre-site</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>