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
|
*.iml
|
||||||
.idea
|
.idea
|
||||||
*.patch
|
*.patch
|
||||||
pmd-java/src/site/site.xml
|
*/src/site/site.xml
|
||||||
pmd-javascript/src/site/site.xml
|
*/src/site/markdown/rules
|
||||||
pmd-jsp/src/site/site.xml
|
*/src/site/markdown/mergedruleset.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
|
|
||||||
|
@ -66,14 +66,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -68,10 +68,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
@ -104,20 +104,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</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.
|
**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
|
While the bytecode generated by the java compiler is indeed different, at runtime the instructions
|
||||||
are optimized to the fastest way automatically.
|
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.
|
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>
|
</description>
|
||||||
<priority>3</priority>
|
<priority>3</priority>
|
||||||
|
@ -35,20 +35,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -60,10 +46,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
@ -93,20 +93,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -91,7 +91,7 @@ response.setHeader("Pragma", "No-cache");
|
|||||||
class="net.sourceforge.pmd.lang.jsp.rule.basic.NoInlineStyleInformationRule"
|
class="net.sourceforge.pmd.lang.jsp.rule.basic.NoInlineStyleInformationRule"
|
||||||
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineStyleInformation">
|
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineStyleInformation">
|
||||||
<description><![CDATA[
|
<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>
|
</description>
|
||||||
<priority>3</priority>
|
<priority>3</priority>
|
||||||
<example>
|
<example>
|
||||||
@ -267,10 +267,8 @@ and
|
|||||||
message="Avoiding inlining HTML script content"
|
message="Avoiding inlining HTML script content"
|
||||||
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineScript">
|
externalInfoUrl="${pmd.website.baseurl}/rules/jsp/basic.html#NoInlineScript">
|
||||||
<description>
|
<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.
|
Externalized script could be reused between pages. Browsers can also cache the script, reducing overall download bandwidth.
|
||||||
]]>
|
|
||||||
</description>
|
</description>
|
||||||
<priority>3</priority>
|
<priority>3</priority>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -66,14 +66,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -66,14 +66,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
@ -93,20 +93,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -66,14 +66,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -56,15 +56,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<xdocDirectory>${project.build.directory}/generated-xdocs</xdocDirectory>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
@ -57,10 +57,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
@ -93,20 +93,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -35,20 +35,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -60,10 +46,10 @@
|
|||||||
<phase>clean</phase>
|
<phase>clean</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<echo>PMD specific tasks: cleaning generated xdocs</echo>
|
<echo>PMD specific tasks: cleaning generated markdown</echo>
|
||||||
<delete quiet="true">
|
<delete quiet="true">
|
||||||
<fileset dir="${basedir}/src/site/xdoc/rules/" includes="**/*.xml" />
|
<fileset dir="${basedir}/src/site/markdown/rules/" includes="**/*.md" />
|
||||||
<fileset dir="${basedir}/src/site/xdoc/" includes="mergedruleset.xml" />
|
<fileset dir="${basedir}/src/site/markdown/" includes="mergedruleset.xml" />
|
||||||
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
<fileset dir="${basedir}/src/site/" includes="site.xml" />
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
|
9
pom.xml
9
pom.xml
@ -398,7 +398,14 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.sourceforge.pmd</groupId>
|
<groupId>net.sourceforge.pmd</groupId>
|
||||||
<artifactId>pmd-build</artifactId>
|
<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>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
Reference in New Issue
Block a user