forked from phoedos/pmd
Use new pmd-build plugin, adjust some rule documentation for markdown changes
This commit is contained in:
11
.gitignore
vendored
11
.gitignore
vendored
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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 <B> or <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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
9
pom.xml
9
pom.xml
@ -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>
|
||||
|
Reference in New Issue
Block a user