Skip to content

Commit

Permalink
Use new pmd-build plugin, adjust some rule documentation for markdown…
Browse files Browse the repository at this point in the history
… changes
  • Loading branch information
adangel committed Mar 15, 2015
1 parent d177860 commit dd6affe
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 158 deletions.
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions pmd-cpp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
20 changes: 3 additions & 17 deletions pmd-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions pmd-java/src/main/resources/rulesets/java/controversial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
20 changes: 3 additions & 17 deletions pmd-javascript/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
20 changes: 3 additions & 17 deletions pmd-jsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 2 additions & 4 deletions pmd-jsp/src/main/resources/rulesets/jsp/basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 0 additions & 8 deletions pmd-matlab/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 0 additions & 8 deletions pmd-objectivec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
20 changes: 3 additions & 17 deletions pmd-plsql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 0 additions & 8 deletions pmd-python/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
9 changes: 0 additions & 9 deletions pmd-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
20 changes: 3 additions & 17 deletions pmd-vm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
20 changes: 3 additions & 17 deletions pmd-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit dd6affe

Please sign in to comment.