Compare commits
248
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d3cba2a2e | ||
|
|
2b7463ac4d | ||
|
|
0ac6f23098 | ||
|
|
c6cc722fc1 | ||
|
|
af3d0be27e | ||
|
|
d7ac591da0 | ||
|
|
32fb4784d6 | ||
|
|
a585e1d1bb | ||
|
|
83a811f2f8 | ||
|
|
f58ecd51dc | ||
|
|
307040f53f | ||
|
|
4cb3e53d4b | ||
|
|
314151c761 | ||
|
|
cca1aac4d9 | ||
|
|
2654bbff4d | ||
|
|
8bbca10f73 | ||
|
|
3dea951e0c | ||
|
|
3cd12def47 | ||
|
|
ad3086eb2b | ||
|
|
f2ac93a42d | ||
|
|
14cc641316 | ||
|
|
b60d442777 | ||
|
|
a050468aea | ||
|
|
85914a9a2c | ||
|
|
232eeb24f0 | ||
|
|
8cebc5dc84 | ||
|
|
0496cc8fc5 | ||
|
|
66ef2399e3 | ||
|
|
ee246222ae | ||
|
|
791ddbef0b | ||
|
|
d0f2ec451a | ||
|
|
9487afa38f | ||
|
|
ba1404de3f | ||
|
|
c8da4a1c83 | ||
|
|
5155cdd50d | ||
|
|
d0af1fc350 | ||
|
|
94b5c9f797 | ||
|
|
fb32b871d8 | ||
|
|
1668a79f03 | ||
|
|
340e0f2583 | ||
|
|
4155d94028 | ||
|
|
d79bc38bd1 | ||
|
|
3efe93295c | ||
|
|
ad7c32bcff | ||
|
|
6112861894 | ||
|
|
ec289775c3 | ||
|
|
d10160ae45 | ||
|
|
bbd2b945cf | ||
|
|
866eb78393 | ||
|
|
ba6485bdc7 | ||
|
|
a40c07aeb2 | ||
|
|
a37296d7b9 | ||
|
|
260e0730b7 | ||
|
|
384cfa8bcd | ||
|
|
3f39a04a58 | ||
|
|
a3393f4b13 | ||
|
|
17442f2028 | ||
|
|
c7933c9700 | ||
|
|
779e304d18 | ||
|
|
61498acc39 | ||
|
|
12faf9023b | ||
|
|
46671ba8b8 | ||
|
|
d1c1863f07 | ||
|
|
75201a5a60 | ||
|
|
0b23f48cf4 | ||
|
|
73a989fc97 | ||
|
|
779526036a | ||
|
|
19da0dfc1a | ||
|
|
ffc48e9835 | ||
|
|
fdb5dcc628 | ||
|
|
043e5d02f3 | ||
|
|
7a083a30e9 | ||
|
|
c831d82bf0 | ||
|
|
2130c12ba3 | ||
|
|
79ef486724 | ||
|
|
b937b65558 | ||
|
|
38044fb7f5 | ||
|
|
cc3f172ef2 | ||
|
|
8fe5a0d780 | ||
|
|
f67056e7d7 | ||
|
|
59eaa27c59 | ||
|
|
d836721675 | ||
|
|
aaeaefad1a | ||
|
|
6f857aa813 | ||
|
|
1d7d5e6474 | ||
|
|
a73b7f1fb1 | ||
|
|
64d3bc28cb | ||
|
|
8b4ade3016 | ||
|
|
60c0bcb858 | ||
|
|
0b60a2d6ff | ||
|
|
73ebf2603a | ||
|
|
6f427f9fa5 | ||
|
|
d6b326838f | ||
|
|
0e3a92c291 | ||
|
|
bbc1d2a02f | ||
|
|
0e1bf46e07 | ||
|
|
6243e25400 | ||
|
|
ae499b9132 | ||
|
|
c168ecc6e5 | ||
|
|
ac439685fc | ||
|
|
2321376151 | ||
|
|
f7cefa4a7d | ||
|
|
eeb8b10892 | ||
|
|
2577acd87e | ||
|
|
e3ad18317a | ||
|
|
6bc10af45e | ||
|
|
5a1a457eae | ||
|
|
59a60be0d2 | ||
|
|
f7aa88db54 | ||
|
|
eb371c24a1 | ||
|
|
a846ccb014 | ||
|
|
a31f7f3578 | ||
|
|
ecb51fbac5 | ||
|
|
3ab42655dc | ||
|
|
c44b0c2c87 | ||
|
|
2817991f7d | ||
|
|
ce0fd33919 | ||
|
|
316ef30f5b | ||
|
|
7a7381829a | ||
|
|
9e0de88bc2 | ||
|
|
13f6224635 | ||
|
|
a4e7012c63 | ||
|
|
de924b50cf | ||
|
|
605de6f7bf | ||
|
|
751ed84e0d | ||
|
|
b5a90924a7 | ||
|
|
ca664ea719 | ||
|
|
d740f68a94 | ||
|
|
d20f8f2291 | ||
|
|
72cc961ca8 | ||
|
|
e26de08062 | ||
|
|
9b4b50560d | ||
|
|
240e548c36 | ||
|
|
9172c26905 | ||
|
|
1b2063cf94 | ||
|
|
8c64498325 | ||
|
|
ffb1131fe0 | ||
|
|
3f719b9b0f | ||
|
|
aea7c89175 | ||
|
|
0fb697a50b | ||
|
|
e300a2630b | ||
|
|
59646f99d2 | ||
|
|
743d2da79a | ||
|
|
4e8664c244 | ||
|
|
5948b700b3 | ||
|
|
2a8cf167b9 | ||
|
|
d4aad400d5 | ||
|
|
f7f2532566 | ||
|
|
8cdc5bd985 | ||
|
|
0252a9c905 | ||
|
|
8f8afde50b | ||
|
|
6836ae8bcd | ||
|
|
51ca03348c | ||
|
|
41d0550d99 | ||
|
|
06bb1a6f27 | ||
|
|
fc173e08c8 | ||
|
|
14461efefd | ||
|
|
68c1d53a59 | ||
|
|
80a7ece0bc | ||
|
|
10f5aa8d69 | ||
|
|
9893f33977 | ||
|
|
2e0bffe7a3 | ||
|
|
718ef77283 | ||
|
|
4ac13741ab | ||
|
|
f3c1227dcc | ||
|
|
7cd887ba8c | ||
|
|
c07f274b4e | ||
|
|
037cf154f7 | ||
|
|
69ff09410a | ||
|
|
39e59dd02f | ||
|
|
7ed88ed4cf | ||
|
|
ef13f147ce | ||
|
|
e0dbf498e2 | ||
|
|
c777f4d548 | ||
|
|
b3d2a856a8 | ||
|
|
59a61fb58c | ||
|
|
7e018ac3bd | ||
|
|
d4e6c1872d | ||
|
|
767cea113d | ||
|
|
5f2d71cdde | ||
|
|
263b91d556 | ||
|
|
94cfdb93fd | ||
|
|
91ad44ba0a | ||
|
|
2141dba366 | ||
|
|
d700a3ea11 | ||
|
|
7a6f82b222 | ||
|
|
1da7b889b7 | ||
|
|
8b9942436d | ||
|
|
3d0d4436de | ||
|
|
5620b24c8f | ||
|
|
8a0052dee9 | ||
|
|
80e5944dcd | ||
|
|
169ab5d225 | ||
|
|
d1e9279f3a | ||
|
|
244c79ecb0 | ||
|
|
10bc1bab17 | ||
|
|
1b59db43f3 | ||
|
|
18e444b448 | ||
|
|
be028ccaef | ||
|
|
4583fde181 | ||
|
|
a0b8ff4c4a | ||
|
|
9ce5a5be43 | ||
|
|
d951795634 | ||
|
|
f663b9773a | ||
|
|
79a84939c5 | ||
|
|
b287a5a73c | ||
|
|
d9c6cb8b31 | ||
|
|
791e3f10e4 | ||
|
|
8534a438a6 | ||
|
|
185958c419 | ||
|
|
123fc5f64f | ||
|
|
eed1a59034 | ||
|
|
2ab3bd3ac6 | ||
|
|
bf5c221439 | ||
|
|
f84db1bffc | ||
|
|
0043392460 | ||
|
|
99a31e423a | ||
|
|
823d3447c8 | ||
|
|
68ff19de08 | ||
|
|
55218c6196 | ||
|
|
ab934c2a9b | ||
|
|
cd2745d5fe | ||
|
|
f9590d218a | ||
|
|
cfde99a990 | ||
|
|
d2429a95cc | ||
|
|
713dc2a9a5 | ||
|
|
411cf2826f | ||
|
|
99348a8582 | ||
|
|
33bcfed90f | ||
|
|
cdb5525716 | ||
|
|
d157b08bee | ||
|
|
dc353cb718 | ||
|
|
adfd316184 | ||
|
|
2f4cdbd6c3 | ||
|
|
bbad2dfbc2 | ||
|
|
ce49bdd986 | ||
|
|
d61aa6189f | ||
|
|
1593b8037d | ||
|
|
e659268f29 | ||
|
|
e4fa5f88fe | ||
|
|
84cad6c1c4 | ||
|
|
7a3d8ceb9a | ||
|
|
159cbfa9e9 | ||
|
|
89b1d699bf | ||
|
|
76a293d720 | ||
|
|
4378fd6bdf | ||
|
|
4d127404d3 | ||
|
|
e84d41bebb |
No files matched your search
+3
-5
@@ -3,12 +3,10 @@
|
||||
<classpathentry kind="src" path="regress"/>
|
||||
<classpathentry kind="src" path="rulesets"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="var" path="JRE_LIB"/>
|
||||
<classpathentry kind="var" path="ANT_HOME/ant.jar"/>
|
||||
<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
|
||||
<classpathentry kind="lib" path="lib/junit-4.4.jar"/>
|
||||
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jdt_3.1.0.jar"/>
|
||||
<classpathentry kind="var" path="JDK1.5_HOME/lib/tools.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jaxen-1.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/asm-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/asm-3.2.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
||||
+1
-12
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>pmd4jsp-cvs</name>
|
||||
<name>pmd-4.3.x</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@@ -10,19 +10,8 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/org.maven.ide.eclipse.maven2Builder.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2003, InfoEther, LLC
|
||||
Copyright (c) 2003-2009, InfoEther, LLC
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
set TOPDIR=%~dp0/..
|
||||
set VERSION=4.2
|
||||
set VERSION=4.3
|
||||
set PMDJAR=%TOPDIR%/lib/pmd-%VERSION%.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.1.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.2.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set OPTS=
|
||||
set MAIN_CLASS=net.sourceforge.pmd.util.viewer.Viewer
|
||||
|
||||
|
||||
Executable → Regular
+2
-2
@@ -1,7 +1,7 @@
|
||||
TOPDIR=..
|
||||
VERSION=4.2
|
||||
VERSION=4.3
|
||||
PMDJAR=$TOPDIR/lib/pmd-$VERSION.jar
|
||||
JARPATH=$TOPDIR/lib/asm-3.1.jar:$TOPDIR/lib/jaxen-1.1.1.jar
|
||||
JARPATH=$TOPDIR/lib/asm-3.2.jar:$TOPDIR/lib/jaxen-1.1.1.jar
|
||||
OPTS=
|
||||
MAIN_CLASS=net.sourceforge.pmd.util.viewer.Viewer
|
||||
|
||||
|
||||
+91
-33
@@ -7,14 +7,16 @@
|
||||
<property name="dir.src" value="src/" />
|
||||
<property name="dir.build" value="build/" />
|
||||
<property name="dir.target" value="target/" />
|
||||
<property name="dir.release" value="release/" />
|
||||
<property name="dir.rulesets" value="rulesets/" />
|
||||
<property name="dir.regress" value="regress/" />
|
||||
<property name="version" value="4.2" />
|
||||
<property name="version" value="4.3" />
|
||||
|
||||
<property name="asm.version" value="3.1" />
|
||||
<property name="asm.version" value="3.2" />
|
||||
<property name="jaxen.version" value="1.1.1" />
|
||||
<property name="junit.version" value="4.4" />
|
||||
<property name="retroweaver.version" value="2.0.5" />
|
||||
<property name="javacc-home.path" value="${dir.lib}" />
|
||||
|
||||
<!--Settings-->
|
||||
<property name="outputTestResultsToFile" value="true" />
|
||||
@@ -31,6 +33,7 @@
|
||||
<target name="delete" description="Deletes the build directory and the pmd-x.x jar file.">
|
||||
<delete dir="${dir.build}" />
|
||||
<delete dir="${dir.target}" />
|
||||
<delete dir="${dir.release}" />
|
||||
<delete file="${dir.lib}/pmd-${version}.jar" />
|
||||
<delete file="${dir.lib}/pmd-src-${version}.jar" />
|
||||
<delete file="${dir.lib}/pmd-test-${version}.jar" />
|
||||
@@ -70,12 +73,19 @@
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="copy,compile" description="Jars up the classes and rulesets">
|
||||
<jar jarfile="${dir.lib}/pmd-${version}.jar" includes="net/sourceforge/pmd/**/**,test/net/sourceforge/pmd/testframework/**/**,rulesets/**" basedir="${dir.build}">
|
||||
<jar jarfile="${dir.lib}/pmd-${version}.jar">
|
||||
<fileset dir="${dir.build}" includes="net/sourceforge/pmd/**/**,test/net/sourceforge/pmd/testframework/**/**,rulesets/**"/>
|
||||
<zipfileset dir="etc" includes="ruleset.dtd,ruleset_xml_schema.xsd" prefix="rulesets"/>
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.sourceforge.pmd.PMD" />
|
||||
<attribute name="Class-Path" value="jaxen-${jaxen.version}.jar asm-${asm.version}.jar" />
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
<jar jarfile="${dir.lib}/pmd-test-${version}.jar"
|
||||
includes="test/net/sourceforge/pmd/**/**"
|
||||
excludes="test/net/sourceforge/pmd/testframework/**/**"
|
||||
basedir="${dir.build}" />
|
||||
</target>
|
||||
|
||||
<taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
|
||||
@@ -125,10 +135,6 @@
|
||||
<classpath refid="retroweaverclasspath" />
|
||||
</retroweaver>
|
||||
|
||||
<jar jarfile="${dir.lib}/pmd-test-${version}.jar"
|
||||
includes="test/net/sourceforge/pmd/**/**,test/net/sourceforge/pmd/testframework/**/**"
|
||||
excludes="test/net/sourceforge/pmd/testframework/**/**" basedir="${dir.build}" />
|
||||
|
||||
<retroweaver inputjar="${dir.lib}/pmd-test-${version}.jar" outputjar="${dir.lib14}/pmd14-test-${version}.jar" target="1.4" failonerror="true" verify="true">
|
||||
<classpath refid="retroweaverclasspath" />
|
||||
</retroweaver>
|
||||
@@ -141,11 +147,8 @@
|
||||
<target name="pmd" description="Runs PMD" depends="copy, compile">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="dependencies.path" />
|
||||
<pmd rulesetfiles="unusedcode" shortFilenames="true">
|
||||
<classpath>
|
||||
<path refid="dependencies.path" />
|
||||
</classpath>
|
||||
<formatter type="csv" toFile="rpt.csv" toConsole="true" linkPrefix="http://pmd.sf.net/xref/" />
|
||||
<fileset dir="/usr/local/java/src/java/net/">
|
||||
<fileset dir="src/">
|
||||
<include name="**/*.java" />
|
||||
</fileset>
|
||||
</pmd>
|
||||
@@ -154,15 +157,13 @@
|
||||
<target name="pmdOnPmd" description="Runs PMD on PMD" depends="copy, compile">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="dependencies.path" />
|
||||
<pmd rulesetfiles="${dir.rulesets}internal/dogfood.xml" shortFilenames="true" targetjdk="1.5">
|
||||
<classpath>
|
||||
<path refid="dependencies.path" />
|
||||
</classpath>
|
||||
<formatter type="text" toConsole="true"/>
|
||||
<fileset dir="${dir.src}">
|
||||
<include name="**/*.java" />
|
||||
<exclude name="**/ast/*.java" />
|
||||
<exclude name="**/cppast/*.java" />
|
||||
</fileset>
|
||||
<exclude name="net/sourceforge/pmd/dcd/**/*.java" />
|
||||
</fileset>
|
||||
</pmd>
|
||||
</target>
|
||||
|
||||
@@ -214,7 +215,7 @@
|
||||
<delete dir="${test.outputdir}" />
|
||||
<mkdir dir="${test.outputdir}/xml"/>
|
||||
<junit printsummary="${test.printsummary}" showoutput="no" filtertrace="yes" haltonfailure="no" jvm="${test.jvm}" forkmode="perBatch"
|
||||
failureProperty="test.failure"
|
||||
failureProperty="test.failure"
|
||||
>
|
||||
<sysproperty key="pmd.regress" value="${test.regression}"/>
|
||||
<classpath>
|
||||
@@ -243,8 +244,8 @@
|
||||
</fileset>
|
||||
<report format="frames" todir="${test.outputdir}/html" />
|
||||
</junitreport>
|
||||
<xslt in="${test.outputdir}/xml/TESTS-TestSuites.xml" style="etc/xslt/junit-txt-output.xsl" out="${test.outputdir}/summary.txt" />
|
||||
<concat>
|
||||
<xslt in="${test.outputdir}/xml/TESTS-TestSuites.xml" style="etc/xslt/junit-txt-output.xsl" out="${test.outputdir}/summary.txt" />
|
||||
<concat>
|
||||
<filelist dir="${test.outputdir}" files="summary.txt"/>
|
||||
</concat>
|
||||
</target>
|
||||
@@ -328,14 +329,28 @@
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="jjtree" description="Generates the Java parser and AST source filesr">
|
||||
<target name="alljavacc" description="Generates all JavaCC aspects within PMD" depends="javajjtree,jspjjtree,cppjavacc">
|
||||
</target>
|
||||
|
||||
<target name="javajjtree" description="Generates the Java parser and AST source filesr">
|
||||
<delete file="src/net/sourceforge/pmd/ast/Java.jj" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/JavaParser.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/JavaParserConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/JavaParserTreeConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/JavaParserTokenManager.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/Token.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/TokenMgrError.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/ParseException.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/CharStream.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/JavaCharStream.java" />
|
||||
<jjtree target="etc/grammar/Java.jjt" outputdirectory="src/net/sourceforge/pmd/ast" javacchome="${javacc-home.path}" />
|
||||
<javacc target="src/net/sourceforge/pmd/ast/Java.jj" outputdirectory="src/net/sourceforge/pmd/ast" javacchome="${javacc-home.path}" />
|
||||
|
||||
<!-- Generate ASCII w/ Unicode Escapes CharStream implementation -->
|
||||
<javacc usercharstream="false" unicodeinput="false" javaunicodeescape="true" static="false" target="src/net/sourceforge/pmd/ast/Java.jj" outputdirectory="src/net/sourceforge/pmd/ast" javacchome="${javacc-home.path}" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/JavaCharStream.java" token="public class JavaCharStream" value="public class JavaCharStream implements CharStream" />
|
||||
|
||||
<!-- Ensure generated using CharStream interface -->
|
||||
<javacc static="false" usercharstream="true" target="src/net/sourceforge/pmd/ast/Java.jj" outputdirectory="src/net/sourceforge/pmd/ast" javacchome="${javacc-home.path}" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/Java.jj" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/JavaParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/JavaParser.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
@@ -344,21 +359,56 @@
|
||||
<replace file="src/net/sourceforge/pmd/ast/ParseException.java" token="extends Exception" value="extends RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/JavaParserVisitor.java" token="SimpleNode" value="SimpleJavaNode" />
|
||||
<replace file="src/net/sourceforge/pmd/ast/Token.java">
|
||||
<replacetoken><![CDATA[ default : return new Token(ofKind, image);
|
||||
}
|
||||
}
|
||||
]]></replacetoken>
|
||||
<replacevalue><![CDATA[ case JavaParserConstants.RUNSIGNEDSHIFT :
|
||||
case JavaParserConstants.RSIGNEDSHIFT :
|
||||
case JavaParserConstants.GT:
|
||||
return new GTToken(ofKind, image);
|
||||
default : return new Token(ofKind, image);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class GTToken extends Token {
|
||||
public int realKind = JavaParserConstants.GT;
|
||||
public GTToken(int ofKind, String image) {
|
||||
super(ofKind, image);
|
||||
}
|
||||
}
|
||||
]]></replacevalue>
|
||||
</replace>
|
||||
</target>
|
||||
|
||||
<target name="jspjjtree" description="Generates the JSP parser and AST source filesr">
|
||||
<delete file="src/net/sourceforge/pmd/ast/jsp/JspParser.jj" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/jsp/JspParser.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/jsp/JspParserConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/jsp/JspParserTreeConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/ast/jsp/JspParserTokenManager.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParser.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParserConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParserTreeConstants.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParserTokenManager.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/Token.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/TokenMgrError.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/ParseException.java" />
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/CharStream.java" />
|
||||
<jjtree target="etc/grammar/JspParser.jjt" outputdirectory="src/net/sourceforge/pmd/jsp/ast/" javacchome="${javacc-home.path}" />
|
||||
<javacc target="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" outputdirectory="src/net/sourceforge/pmd/jsp/ast" javacchome="${javacc-home.path}" />
|
||||
|
||||
<!-- Generate Unicode w/o Unicode Escapes CharStream implementation -->
|
||||
<javacc static="false" usercharstream="false" unicodeinput="true" javaunicodeescape="false" target="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" outputdirectory="src/net/sourceforge/pmd/jsp/ast" javacchome="${javacc-home.path}" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/SimpleCharStream.java" token="public class SimpleCharStream" value="public class JspCharStream implements CharStream" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/SimpleCharStream.java" token="public SimpleCharStream" value="public JspCharStream" />
|
||||
<move file="src/net/sourceforge/pmd/jsp/ast/SimpleCharStream.java" tofile="src/net/sourceforge/pmd/jsp/ast/JspCharStream.java"/>
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParser.java" />
|
||||
|
||||
<!-- Ensure generated using CharStream interface -->
|
||||
<javacc static="false" usercharstream="true" unicodeinput="true" javaunicodeescape="false" target="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" outputdirectory="src/net/sourceforge/pmd/jsp/ast" javacchome="${javacc-home.path}" />
|
||||
|
||||
<delete file="src/net/sourceforge/pmd/jsp/ast/JspParser.jj" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/JspParserTokenManager.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/JspParser.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/JspCharStream.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/ParseException.java" token="throw new Error" value="throw new RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/ParseException.java" token="extends Exception" value="extends net.sourceforge.pmd.ast.ParseException" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/CharStream.java" token="public interface CharStream {" value="public interface CharStream extends net.sourceforge.pmd.ast.CharStream {" />
|
||||
<replace file="src/net/sourceforge/pmd/jsp/ast/TokenMgrError.java" token="extends Error" value="extends RuntimeException" />
|
||||
</target>
|
||||
|
||||
@@ -366,25 +416,33 @@
|
||||
<delete>
|
||||
<fileset dir="src/net/sourceforge/pmd/cpd/cppast">
|
||||
<include name="*.java" />
|
||||
<exclude name="TokenMgrError.java" /> <!-- TokenMgrError customized to report filename, so don't delete it -->
|
||||
</fileset>
|
||||
</delete>
|
||||
<javacc target="etc/grammar/cpp.jj" outputdirectory="src/net/sourceforge/pmd/cpd/cppast" javacchome="${javacc-home.path}" />
|
||||
<!-- In PMD pre-5.0, CPP uses a static parser without a CharStream interface -->
|
||||
<javacc static="true"
|
||||
usercharstream="false"
|
||||
target="etc/grammar/cpp.jj"
|
||||
outputdirectory="src/net/sourceforge/pmd/cpd/cppast"
|
||||
javacchome="${javacc-home.path}" />
|
||||
<replace file="src/net/sourceforge/pmd/cpd/cppast/ParseException.java" token="extends Exception" value="extends RuntimeException" />
|
||||
<replace file="src/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java">
|
||||
<replacetoken><![CDATA["Lexical error at line "]]></replacetoken>
|
||||
<replacevalue><![CDATA["Lexical error in file " + CPPParserTokenManager.getFileName() + " at line "]]></replacevalue>
|
||||
</replace>
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="delete,compile,copy" description="Does a complete recompile" />
|
||||
|
||||
<target name="dist" depends="clean,jar,weave" description="Preps things for a release" />
|
||||
<target name="dist" depends="clean,jar" description="Preps things for a release" />
|
||||
|
||||
<target name="cpdjnlp" depends="dist" description="Uploads a new CPD JNLP thingy to the PMD web site">
|
||||
<signjar jar="${dir.lib}/pmd-${version}.jar" storetype="${keystore.type}" alias="${keystore.alias}" keystore="${keystore.path}" storepass="${keystore.password}" />
|
||||
<exec executable="scp" os="Linux">
|
||||
<arg line=" ${dir.lib}/pmd-${version}.jar pmd.sourceforge.net:/home/groups/p/pm/pmd/htdocs" />
|
||||
<arg line=" ${dir.lib}/pmd-${version}.jar ${user.name},pmd@web.sourceforge.net:/home/groups/p/pm/pmd/htdocs" />
|
||||
</exec>
|
||||
<echo message="Uploading cpd.jnlp" />
|
||||
<exec executable="scp" os="Linux">
|
||||
<arg line=" etc/cpd.jnlp pmd.sourceforge.net:/home/groups/p/pm/pmd/htdocs" />
|
||||
<arg line=" etc/cpd.jnlp ${user.name},pmd@web.sourceforge.net:/home/groups/p/pm/pmd/htdocs" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
Executable → Regular
+24
-3
@@ -19,7 +19,13 @@ if [ -z "$1" ]; then
|
||||
echo " $script <directory>"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
esac
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
CWD="$PWD"
|
||||
@@ -27,6 +33,14 @@ CWD="$PWD"
|
||||
cd "$SCRIPT_DIR/../lib"
|
||||
LIB_DIR=`pwd -P`
|
||||
|
||||
# If cygwin, convert to Unix form before manipulating
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
classpath=$CLASSPATH
|
||||
|
||||
build_dir="$SCRIPT_DIR/../build"
|
||||
@@ -55,11 +69,18 @@ case "$HEAPSIZE" in
|
||||
esac
|
||||
|
||||
case "$LANGUAGE" in
|
||||
cpp|c) ;;
|
||||
*) echo "Language '$LANGUAGE' unknown (try: cpp, c)"
|
||||
c|cpp|cs|fortran|java|jsp|php|ruby) ;;
|
||||
*) echo "Language '$LANGUAGE' unknown (try: c, cpp, fortran, java, jsp, php, ruby)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# echo "CLASSPATH: $classpath"
|
||||
|
||||
java $HEAPSIZE -cp $classpath net.sourceforge.pmd.cpd.CPD --minimum-tokens $MINIMUM_TOKENS --files $DIRECTORY --language $LANGUAGE
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
|
||||
classpath=`cygpath --path --windows "$classpath"`
|
||||
DIRECTORY=`cygpath --windows "$DIRECTORY"`
|
||||
fi
|
||||
|
||||
java $HEAPSIZE -cp $classpath net.sourceforge.pmd.cpd.CPD --minimum-tokens $MINIMUM_TOKENS --files $DIRECTORY --language $LANGUAGE ${@}
|
||||
Executable → Regular
+2
-2
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
set TOPDIR=%~dp0/..
|
||||
set VERSION=4.2
|
||||
set VERSION=4.3
|
||||
set PMDJAR=%TOPDIR%/lib/pmd-%VERSION%.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.1.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.2.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set OPTS=-Xmx512m
|
||||
set MAIN_CLASS=net.sourceforge.pmd.cpd.GUI
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Shell script to launch PMD's Copy Paste Detector GUI on a
|
||||
# UNIX system, based on the cpdgui.bat file used to do the
|
||||
# same on MS Windows systems. This requires that the "java"
|
||||
# command be in your executable PATH.
|
||||
|
||||
# Version number for this PMD release
|
||||
VERSION=4.2.6
|
||||
|
||||
BINDIR=`dirname $0`
|
||||
ROOTDIR=${BINDIR}/..
|
||||
PMDJAR=${ROOTDIR}/lib/pmd-${VERSION}.jar
|
||||
JARPATH=${TOPDIR}/lib/asm-3.2.jar:${TOPDIR}/lib/jaxen-1.1.1.jar
|
||||
JVMOPTS=-Xmx512m
|
||||
MAIN_CLASS=net.sourceforge.pmd.cpd.GUI
|
||||
|
||||
java ${JVMOPTS} -cp "${PMDJAR}:${JARPATH}" ${MAIN_CLASS} $*
|
||||
@@ -1,17 +0,0 @@
|
||||
#! /bin/sh
|
||||
cygwin=false;
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
esac
|
||||
FILE=$1
|
||||
FORMAT=$2
|
||||
RULESETFILES=$3
|
||||
VERSION=4.2
|
||||
PMD_CLASSPATH=../lib/pmd-$VERSION.jar:../lib/jaxen-1.1.1.jar:../lib/asm-3.1.jar
|
||||
if $cygwin; then
|
||||
FILE=`cygpath --windows "$FILE"`
|
||||
PMD_CLASSPATH=`cygpath --path --windows "$PMD_CLASSPATH"`
|
||||
echo since they are comma delimited the RULESETFILES "$RULESETFILES"
|
||||
echo will need an iteration loop to convert properly
|
||||
fi
|
||||
java -cp ${PMD_CLASSPATH} net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES
|
||||
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
set TOPDIR=%~dp0/..
|
||||
set VERSION=4.2
|
||||
set VERSION=4.3
|
||||
set PMDJAR=%TOPDIR%/lib/pmd-%VERSION%.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.1.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.2.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set OPTS=
|
||||
set MAIN_CLASS=net.sourceforge.pmd.util.designer.Designer
|
||||
|
||||
|
||||
Executable → Regular
+19
@@ -1,11 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
esac
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
CWD="$PWD"
|
||||
|
||||
cd "$SCRIPT_DIR/../lib"
|
||||
LIB_DIR=`pwd -P`
|
||||
|
||||
# If cygwin, convert to Unix form before manipulating
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
classpath=$CLASSPATH
|
||||
|
||||
build_dir="$SCRIPT_DIR/../build"
|
||||
@@ -31,4 +45,9 @@ RULESETFILES="$@"
|
||||
|
||||
# echo "CLASSPATH: $classpath"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
classpath=`cygpath --path --windows "$classpath"`
|
||||
fi
|
||||
|
||||
java -cp $classpath net.sourceforge.pmd.util.designer.Designer
|
||||
Executable → Regular
+2
-2
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
set TOPDIR=%~dp0/..
|
||||
set VERSION=4.2
|
||||
set VERSION=4.3
|
||||
set PMDJAR=%TOPDIR%/lib/pmd-%VERSION%.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.1.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set JARPATH=%TOPDIR%/lib/asm-3.2.jar;%TOPDIR%/lib/jaxen-1.1.1.jar
|
||||
set OPTS=
|
||||
set MAIN_CLASS=net.sourceforge.pmd.PMD
|
||||
|
||||
|
||||
Executable → Regular
+21
@@ -7,12 +7,26 @@ if [ -z "$3" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
esac
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
CWD="$PWD"
|
||||
|
||||
cd "$SCRIPT_DIR/../lib"
|
||||
LIB_DIR=`pwd -P`
|
||||
|
||||
# If cygwin, convert to Unix form before manipulating
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
classpath=$CLASSPATH
|
||||
|
||||
build_dir="$SCRIPT_DIR/../build"
|
||||
@@ -38,4 +52,11 @@ RULESETFILES="$@"
|
||||
|
||||
# echo "CLASSPATH: $classpath"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
|
||||
classpath=`cygpath --path --windows "$classpath"`
|
||||
FILE=`cygpath --windows "$FILE"`
|
||||
fi
|
||||
|
||||
java -Xmx512m -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES
|
||||
Executable → Regular
+1
-1
@@ -6,7 +6,7 @@ set ANT_HOME=c:\ant
|
||||
set PATH=c:\j2sdk1.4.2_04\bin;c:\ant\bin\;%PATH%
|
||||
set CLASSPATH=../build/
|
||||
set CLASSPATH=%CLASSPATH%;../
|
||||
set CLASSPATH=%CLASSPATH%;../lib/asm-3.1.jar
|
||||
set CLASSPATH=%CLASSPATH%;../lib/asm-3.2.jar
|
||||
set CLASSPATH=%CLASSPATH%;../lib/jaxen-1.1.1.jar
|
||||
set CLASSPATH=%CLASSPATH%;c:\javacc2.1\bin\lib\JavaCC.zip
|
||||
set CLASSPATH=%CLASSPATH%;c:\ant\lib\ant.jar
|
||||
|
||||
Executable → Regular
+1
-1
@@ -4,5 +4,5 @@ PATH=/usr/local/java/bin/:$PATH
|
||||
ANT_OPTS="-Xmx512m -Xms64m"
|
||||
PATH=$MAVEN_HOME/bin:$PATH
|
||||
CVSROOT=:ext:tomcopeland@cvs.sourceforge.net:/cvsroot/pmd
|
||||
CLASSPATH=../build/:../lib/asm-3.1.jar:../lib/jaxen-1.1.1.jar:../lib/junit-4.4.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/ant-nodeps.jar
|
||||
CLASSPATH=../build/:../lib/asm-3.2.jar:../lib/jaxen-1.1.1.jar:../lib/junit-4.4.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/ant-nodeps.jar
|
||||
export CLASSPATH PATH CVSROOT ANT_OPTS
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<project name="pmd" default="jar" basedir=".">
|
||||
|
||||
<target name="delete"> <ant antfile="bin/build.xml" inheritAll="false" target="delete" /> </target>
|
||||
<target name="jar"> <ant antfile="bin/build.xml" inheritAll="false" target="jar" /> </target>
|
||||
<target name="weave"> <ant antfile="bin/build.xml" inheritAll="false" target="weave" /> </target>
|
||||
<target name="pmdOnPmd"> <ant antfile="bin/build.xml" inheritAll="false" target="pmdOnPmd" /> </target>
|
||||
<target name="test"> <ant antfile="bin/build.xml" inheritAll="false" target="test" /> </target>
|
||||
<target name="regress"> <ant antfile="bin/build.xml" inheritAll="false" target="regress" /> </target>
|
||||
<target name="test14"> <ant antfile="bin/build.xml" inheritAll="false" target="test14" /> </target>
|
||||
<target name="regress14"> <ant antfile="bin/build.xml" inheritAll="false" target="regress14" /> </target>
|
||||
<target name="clean"> <ant antfile="bin/build.xml" inheritAll="false" target="clean" /> </target>
|
||||
<target name="dist"> <ant antfile="bin/build.xml" inheritAll="false" target="dist" /> </target>
|
||||
<target name="qa"> <ant antfile="bin/build.xml" inheritAll="false" target="qa" /> </target>
|
||||
|
||||
</project>
|
||||
Executable → Regular
+31
-24
@@ -1,55 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
restore_from_repository() {
|
||||
local dir="${1}"
|
||||
|
||||
git status "${dir}"
|
||||
local status="${?}"
|
||||
if [ ${status} -eq 0 ]; then
|
||||
git reset HEAD "${dir}"
|
||||
git checkout "${dir}"
|
||||
else
|
||||
svn up "${dir}"
|
||||
fi
|
||||
}
|
||||
|
||||
option="${1}"
|
||||
|
||||
if [ -z $option ]; then
|
||||
echo "Generating from pom, regenerating ruleset docs, and transforming"
|
||||
ruby munge_rulesets.rb
|
||||
maven -qb pmd:rulesets-index xdoc:generate-from-pom
|
||||
maven -qb pmd:ruleset-docs
|
||||
maven -qb pmd:rulesets-index xdoc:generate-from-pom
|
||||
maven -qb pmd:ruleset-docs
|
||||
rm -f rulesets/*.xml
|
||||
svn up rulesets
|
||||
maven -qb xdoc:transform
|
||||
restore_from_repository rulesets
|
||||
maven -qb xdoc:transform
|
||||
elif [ $option = "all" ]; then
|
||||
echo "Running maven site"
|
||||
rm -rf target
|
||||
ruby munge_rulesets.rb
|
||||
maven -qb site
|
||||
rm -f rulesets/*.xml
|
||||
svn up rulesets
|
||||
restore_from_repository rulesets
|
||||
maven -qb xdoc:transform
|
||||
elif [ $option = "uploadcurrent" ]; then
|
||||
echo "Generating and uploading maven artifacts"
|
||||
mvn -q source:jar javadoc:jar deploy
|
||||
mvn -q deploy:deploy-file -Durl=scp://pmd.sourceforge.net/home/groups/p/pm/pmd/htdocs/maven2 -DrepositoryId=pmd-repo -Dfile=java14/lib/pmd14-4.2.jar -DpomFile=pmd-jdk14-pom.xml
|
||||
mvn -q deploy:deploy-file -Durl=scp://shell.sourceforge.net/home/groups/p/pm/pmd/htdocs/maven2 -DrepositoryId=pmd-repo -Dfile=java14/lib/pmd14-4.3.jar -DpomFile=pmd-jdk14-pom.xml
|
||||
echo "Generating xdocs and uploading"
|
||||
ruby munge_rulesets.rb
|
||||
maven -qb pmd:rulesets-index xdoc:generate-from-pom
|
||||
maven -qb pmd:ruleset-docs
|
||||
maven -qb pmd:rulesets-index xdoc:generate-from-pom
|
||||
maven -qb pmd:ruleset-docs
|
||||
rm -f rulesets/*.xml
|
||||
svn up rulesets
|
||||
maven -qb xdoc:transform
|
||||
restore_from_repository rulesets
|
||||
maven -qb xdoc:transform
|
||||
DOCS_FILE=docs.tar.gz
|
||||
cp xdocs/cpdresults.txt xdocs/cpp_cpdresults.txt target/docs/
|
||||
cd target
|
||||
rm -f $DOCS_FILE
|
||||
tar zcf $DOCS_FILE docs/
|
||||
scp $DOCS_FILE pmd.sourceforge.net:/home/groups/p/pm/pmd/htdocs/current/
|
||||
cd ../
|
||||
ssh pmd.sourceforge.net "cd /home/groups/p/pm/pmd/htdocs/current/ && tar -zxf docs.tar.gz && cp -R docs/* . && rm -rf docs && rm docs.tar.gz"
|
||||
cd target/docs
|
||||
rsync -a -e ssh * $USER,pmd@web.sourceforge.net:/home/groups/p/pm/pmd/htdocs
|
||||
cd ../..
|
||||
elif [ $option = "upload" ]; then
|
||||
echo "Generating and uploading maven artifacts"
|
||||
ssh $USER,pmd@shell.sf.net create
|
||||
mvn -q source:jar javadoc:jar deploy
|
||||
mvn -q deploy:deploy-file -Durl=scp://pmd.sourceforge.net/home/groups/p/pm/pmd/htdocs/maven2 -DrepositoryId=pmd-repo -Dfile=java14/lib/pmd14-4.2.jar -DpomFile=pmd-jdk14-pom.xml
|
||||
echo "Uploading xdocs"
|
||||
DOCS_FILE=docs.tar.gz
|
||||
cp xdocs/cpdresults.txt xdocs/cpp_cpdresults.txt target/docs/
|
||||
cd target
|
||||
rm -f $DOCS_FILE
|
||||
tar zcf $DOCS_FILE docs/
|
||||
echo "Starting secure copy"
|
||||
scp $DOCS_FILE pmd.sourceforge.net:/home/groups/p/pm/pmd/
|
||||
cd ../
|
||||
ssh pmd.sourceforge.net "cd /home/groups/p/pm/pmd/ && rm -rf xref && rm -rf apidocs && ./update_docs.sh"
|
||||
cd target/docs
|
||||
rsync -aRvz -e ssh * "${USER}@web.sourceforge.net:/home/project-web/pmd/htdocs"
|
||||
cd ../..
|
||||
fi
|
||||
if [ -e velocity.log ]; then
|
||||
rm velocity.log
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Fixed in Subversion, and you can download a new pmd-4.2.jar file here:
|
||||
|
||||
http://infoether.com/~tom/pmd-4.2.jar
|
||||
|
||||
that contains that fix.
|
||||
|
||||
Thanks,
|
||||
|
||||
Tom
|
||||
The PMD book - $20 - http://pmdapplied.com/
|
||||
@@ -1,3 +1,129 @@
|
||||
November 4, 2011 - 4.3:
|
||||
|
||||
Add support for Java 7 grammer - thanks to Dinesh Bolkensteyn and SonarSource
|
||||
Add options --ignore-literals and --ignore-identifiers to the CPD command line task, thanks to Cd-Man
|
||||
Fixed character reference in xml report - thanks to Seko
|
||||
Add C# support for CPD - thanks to Florian Bauer
|
||||
Fix small bug in Rule Designer UI
|
||||
Improve TooManyMethods rule - thanks to a patch from Riku Nykanen
|
||||
Improve DoNotCallSystemExit - thanks to a patch from Steven Christou
|
||||
Fix false negative for UseArraysAsList when the array was passed as method parameter - thanks to Andy Throgmorton
|
||||
Enhanced SuspiciousEqualsMethodName rule - thanks to Andy Throgmorton
|
||||
Add a script to launch CPDGUI on Unix system - thanks to Tom Wheeler
|
||||
|
||||
New Rule:
|
||||
Basic ruleset: DontCallThreadRun - thanks to Andy Throgmorton
|
||||
Logging with Jakarta Commons ruleset: GuardDebugLogging
|
||||
|
||||
September 14, 2011 - 4.2.6:
|
||||
Fixed bug 2920057 - False + : CloseRessource whith an external getter
|
||||
Fixed bug 1808110 - Fixed performance issue on PreserveStackTrace
|
||||
Fixed bug 2832322 - cpd.xml file tag path attribute should be entity-encoded
|
||||
Fixed bug 2590258 - NPE with nicerhtml output
|
||||
Fixed bug 2317099 - False + in SimplifyCondition
|
||||
Fixed bug 2606609 - False "UnusedImports" positive in package-info.java
|
||||
Fixed bug 2645268 - ClassCastException in UselessOperationOnImmutable.getDeclaration
|
||||
Fixed bug 2724653 - AvoidThreadGroup reports false positives
|
||||
Fixed bug 2835074 - False -: DoubleCheckedLocking with reversed null check
|
||||
Fixed bug 2826119 - False +: DoubleCheckedLocking warning with volatile field
|
||||
Fixed bug 2904832 - Type resolution not working for ASTType when using an inner class
|
||||
|
||||
Modify (and hopefully fixed) CPD algorithm thanks to a patch from Juan Jesús GarcÃa de Soria.
|
||||
Correct -benchmark reporting of Rule visits via the RuleChain
|
||||
Fix issue with Type Resolution incorrectly handling of Classes with same name as a java.lang Class.
|
||||
The JSP/JSF parser can now parse Unicode input.
|
||||
The JSP/JSP parser can now handle <script>...</script> tags. The AST HtmlScript node contains the content.
|
||||
Added Ecmascript as a supported language for CPD.
|
||||
Improved include/exclude pattern matching performance for ends-with type patterns.
|
||||
|
||||
Dependencies updates: asm updated to 3.2
|
||||
|
||||
Android ruleset: CallSuperLast rule now also checks for finish() redefinitions
|
||||
|
||||
New rule:
|
||||
Android: DoNotHardCodeSDCard
|
||||
Controversial : AvoidLiteralsInIfCondition (patch 2591627), UseConcurrentHashMap
|
||||
StrictExceptions : AvoidCatchingGenericException, AvoidLosingExceptionInformation
|
||||
Naming : GenericsNaming
|
||||
JSP: NoInlineScript
|
||||
|
||||
February 08, 2009 - 4.2.5:
|
||||
|
||||
Enhanced logging in the ClassTypeResolver to provide more detailed messaging.
|
||||
Fixed bug 2315623 - @SuppressWarnings("PMD.UseSingleton") has no effect
|
||||
Fixed bug 2230809 - False +: ClassWithOnlyPrivateConstructorsShouldBeFinal
|
||||
Fixed bug 2338341 - ArrayIndexOutOfBoundsException in CPD (on Ruby)
|
||||
Fixed bug 2315599 - False +: UseSingleton with class containing constructor
|
||||
Fixed bug 1955852 - false positives for UnusedPrivateMethod & UnusedLocalVariable
|
||||
Fixed bug 2404700 - UseSingleton should not act on enums
|
||||
Fixed bug 2225474 - VariableNamingConventions does not work with nonprimitives
|
||||
Fixed bug 1609038 - Xslt report generators break if path contains "java"
|
||||
Fixed bug - JUnitTestsShouldIncludeAssert now detects Junit 4 Assert.assert... constructs
|
||||
Fixed bug 2142986 - UselessOverridingMethod doesn't consider annotations
|
||||
Fixed bug 2027626 - False + : AvoidFinalLocalVariable
|
||||
|
||||
New rule:
|
||||
StrictExceptions : AvoidThrowingNewInstanceOfSameException
|
||||
New ruleset:
|
||||
android.xml: new rules specific to the Android platform
|
||||
|
||||
October 12, 2008 - 4.2.4:
|
||||
|
||||
Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives too)
|
||||
Fixed bug 1943204 - Ant task: <ruleset> path should be relative to Ant basedir
|
||||
Fixed bug 2139720 - Exception in PMD Rule Designer for inline comments in source
|
||||
Fixed patch 2075906 - Add toString() to the rule UnnecessaryWrapperObjectCreation
|
||||
Fixed ClassCastException on generic method in BeanMembersShouldSerialize
|
||||
Fixed ClassCastException in symbol table code
|
||||
|
||||
August 31, 2008 - 4.2.3:
|
||||
|
||||
JavaCC generated artifacts updated to JavaCC 4.1d1.
|
||||
Java grammar enhanced to include AnnotationMethodDeclaration as parent node of method related children of AnnotationTypeMemberDeclaration
|
||||
Fixes for exclude-pattern
|
||||
Updates to RuleChain to honor RuleSet exclude-pattern
|
||||
Upgrading UselessOperationOnImmutable to detect more use cases, especially on String and fix false positives
|
||||
Fixed bug 1988829 - Violation reported without source file name (actually a fix to ConsecutiveLiteralAppends)
|
||||
Fixed bug 1989814 - false +: ConsecutiveLiteralAppends
|
||||
Fixed bug 1977230 - false positive: UselessOverridingMethod
|
||||
Fixed bug 1998185 - BeanMembersShouldSerialize vs @SuppressWarnings("serial")
|
||||
Fixed bug 2002722 - false + in UseStringBufferForStringAppends
|
||||
Fixed bug 2056318 - False positive for AvoidInstantiatingObjectsInLoops
|
||||
Fixed bug 1977438 - False positive for UselessStringValueOf
|
||||
Fixed bug 2050064 - False + SuspiciousOctalEscape with backslash literal
|
||||
Fixed bug 1556594 - Wonky detection of NullAssignment
|
||||
Optimizations and false positive fixes in PreserveStackTrace
|
||||
@SuppressWarnings("all") disables all warnings
|
||||
All comment types are now stored in ASTCompilationUnit, not just formal ones
|
||||
Fixed false negative in UselessOverridingMethod
|
||||
Fixed handling of escape characters in UseIndexOfChar and AppendCharacterWithChar
|
||||
|
||||
New rule:
|
||||
Basic ruleset: EmptyInitializer
|
||||
|
||||
May 20, 2008 - 4.2.2:
|
||||
|
||||
Fixed false positive in UnusedImports: javadoc comments are parsed to check @see and other tags
|
||||
Fixed parsing bug: constant fields in annotation classes
|
||||
Bug fix: NPE in MoreThanOneLogger
|
||||
UnnecessaryParentheses now checks all expressions, not just return statements
|
||||
|
||||
April 11, 2008 - 4.2.1:
|
||||
|
||||
'41' and '42' shortcuts for rulesets added
|
||||
Fixed bug 1928009 - Error using migration ruleset in PMD 4.2
|
||||
Fixed bug 1932242 - EmptyMethodInAbstractClassShouldBeAbstract false +
|
||||
Fixed bug 1808110 - PreserveStackTrace
|
||||
|
||||
AvoidDuplicateLiteralRule now has 'skipAnnotations' boolean property
|
||||
ruleset.dtd and ruleset_xml_schema.xsd added to jar file in rulesets directory
|
||||
Update RuleSetWriter to handle non-Apache TRAX implementations, add an option to not use XML Namespaces
|
||||
Added file encoding option to CPD GUI, which already existed for the command line and Ant
|
||||
bin and java14/bin scripts:
|
||||
retroweaver version was not correct in java14/bin scripts
|
||||
support for extra languages in cpd.sh
|
||||
standard unix scripts can be used with cygwin
|
||||
|
||||
March 25, 2008 - 4.2:
|
||||
|
||||
Fixed bug 1920155 - CheckResultSet: Does not pass for loop conditionals
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
<offline-allowed/>
|
||||
<resources>
|
||||
<j2se version="1.5+" max-heap-size="512M"/>
|
||||
<jar href="pmd-4.2.jar"/>
|
||||
<jar href="pmd-4.3.jar"/>
|
||||
</resources>
|
||||
<application-desc main-class="net.sourceforge.pmd.cpd.GUI"/>
|
||||
</jnlp>
|
||||
@@ -10,7 +10,7 @@ run version update script at the top level:
|
||||
./etc/update_version.sh <version>
|
||||
|
||||
tasks implemented by script:
|
||||
update pmd.bat, designer.bat, bgastviewer.*, cygwin-run.sh, cpd.jnlp, cpdgui.bat, build.xml to point to pmd-<version>.jar
|
||||
update pmd.bat, designer.bat, bgastviewer.*, cpd.jnlp, cpdgui.bat, build.xml to point to pmd-<version>.jar
|
||||
update PMD.java, xdocs/running.xml, compiling.xml, integrations.xml, installing.xml to reflect pmd-<version>
|
||||
update the release date in the changelog
|
||||
update release number and tag name in project.xml
|
||||
@@ -24,7 +24,7 @@ ensure all the new rules are listed in a rulesets/releases/<version>.xml file
|
||||
|
||||
ant -f bin/build.xml pmdOnPmd
|
||||
|
||||
ant -f bin/build.xml clean regress test
|
||||
ant -f bin/build.xml clean regress
|
||||
Check in everything
|
||||
|
||||
ant -f bin/build.xml dist regress regress14
|
||||
@@ -37,7 +37,8 @@ TESTS: Can you
|
||||
2) run the Ant 'pmd' task and get a report
|
||||
ant -f bin/build.xml pmd
|
||||
|
||||
run "./generate_release.sh <version>" in etc
|
||||
cd into etc/ and run the release script:
|
||||
$ ./release.sh
|
||||
|
||||
It will run:
|
||||
|
||||
@@ -46,18 +47,12 @@ It will run:
|
||||
|
||||
generate the binary zip file
|
||||
|
||||
svn tag if "yes" is pressed
|
||||
tag svn (unless -s if used)
|
||||
|
||||
generate the source zip file
|
||||
|
||||
if you see a bug and fix it, you can delete the release using:
|
||||
svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_<version>
|
||||
and then retag it
|
||||
|
||||
ncftpput upload.sourceforge.net incoming/ pmd-src-<version>.zip pmd-bin-<version>.zip
|
||||
|
||||
lftp -e "mput -O incoming/ pmd-src-<version>.zip pmd-bin-<version>.zip" upload.sourceforge.net
|
||||
|
||||
Note: if you see a bug and fix it, you can delete the release using (and the retag it):
|
||||
$ svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_<version>
|
||||
|
||||
Go to Admin, File Releases, Add release
|
||||
Paste stuff into the changelog/readme boxes
|
||||
@@ -67,13 +62,40 @@ Classify the file
|
||||
Click File Releases, Edit Release, set previous version to 'hidden'.
|
||||
|
||||
upload command below will create and upload the maven artifacts to sourceforge. Login info
|
||||
for 'pmd-repo' must be defined in ~/.m2/settings.xml
|
||||
for 'pmd-repo' must be defined in ~/.m2/settings.xml:
|
||||
|
||||
---8<---8<---
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
||||
http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
|
||||
<servers>
|
||||
<server>
|
||||
<id>pmd-repo</id>
|
||||
<username>your-sf-login</username>
|
||||
<password>your-sf-pwd</password>
|
||||
</server>
|
||||
</servers>
|
||||
|
||||
</settings>
|
||||
--->8--->8---
|
||||
|
||||
|
||||
cd ~/pmd/pmd/
|
||||
update the "download" and "what's new" link in navigation.xml
|
||||
update date and changelog links in project.xml (recent releases section)
|
||||
|
||||
./docs.sh all
|
||||
./docs.sh upload
|
||||
|
||||
(You might need to "violently" upgrade maven 1's pmd plugins from 3.9 to the latest, by
|
||||
doing that:
|
||||
|
||||
cp lib/pmd-4.3.jar ~/.maven/repository/pmd/jars/pmd-3.9.jar
|
||||
|
||||
Yes, I know, this is beyond ugly - and you'll probably go to hell just for reading this line...)
|
||||
|
||||
update cpd.jnlp by running:
|
||||
|
||||
ant -f bin/build.xml cpdjnlp
|
||||
@@ -83,3 +105,29 @@ Submit news to SF
|
||||
Go to http://freshmeat.net/
|
||||
Submit news to java.net
|
||||
Do a blog entry
|
||||
|
||||
|
||||
Getting the new PMD version into Maven Central Repository:
|
||||
----------------------------------------------------------
|
||||
1. Make sure you have a gpg key:
|
||||
|
||||
gpg --list-keys
|
||||
|
||||
2. Create a bundle
|
||||
|
||||
mvn clean source:jar javadoc:jar package gpg:sign repository:bundle-create -Dgpg.keyname=your_key -Dgpg.passphrase=your_pwd
|
||||
|
||||
3. The bundle is target/pmd-x.x.x-bundle.jar.
|
||||
|
||||
Test it: target/pmd-x.x.x.jar is the file, that is contained in the bundle.
|
||||
So we can use it:
|
||||
|
||||
java -cp target/pmd-x.x.x.jar:lib/asm-3.2.jar:lib/javacc.jar:lib/jaxen-1.1.1.jar net.sourceforge.pmd.PMD src/net/sourceforge/pmd/PMD.java text unusedcode
|
||||
|
||||
This should work: "No problems found!"
|
||||
|
||||
|
||||
4. Upload pmd-x.x.x-bundle.jar to https://oss.sonatype.org.
|
||||
|
||||
More info: https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+Maven+Central
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="//project/version">
|
||||
VERSION:<xsl:value-of select="."/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
scp *.html tomcopeland@pmd.sf.net:/home/groups/p/pm/pmd/htdocs/fr/
|
||||
@@ -1,151 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>•</TITLE>
|
||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.9.104 (Linux)">
|
||||
<META NAME="AUTHOR" CONTENT="Bekrar">
|
||||
<META NAME="CREATED" CONTENT="20050816;5510000">
|
||||
<META NAME="CHANGEDBY" CONTENT="Bekrar">
|
||||
<META NAME="CHANGED" CONTENT="20050816;6020000">
|
||||
<STYLE>
|
||||
<!--
|
||||
@page { size: 8.27in 11.69in; margin: 0.98in }
|
||||
P { margin-bottom: 0.08in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
|
||||
P.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: fr-FR }
|
||||
P.cjk { font-family: "Times New Roman", serif; font-size: 10pt }
|
||||
P.ctl { font-family: "Times New Roman", serif; font-size: 10pt; so-language: ar-SA }
|
||||
A:link { color: #0000ff }
|
||||
A.western:link { font-family: "Arial", sans-serif }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY LANG="en-US" TEXT="#000000" LINK="#0000ff" DIR="LTR">
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/"><B>PMD</B></A></U></FONT></FONT><B><FONT COLOR="#000000">
|
||||
</FONT></B>: c’est un outil<FONT COLOR="#000000"> qui parcours le
|
||||
code source Java et recherche des problèmes potentiels. </FONT>
|
||||
</P>
|
||||
</UL>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-left: 0.25in; margin-bottom: 0in">
|
||||
PMD possède une liste de règles à vérifier,
|
||||
ces règles sont regroupées comme suit :</P>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-left: 0.25in; margin-bottom: 0in">
|
||||
<BR>
|
||||
</P>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-left: 0.25in; margin-bottom: 0in">
|
||||
<BR>
|
||||
</P>
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-top: 0.19in; margin-bottom: 0in">
|
||||
<FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Finalizer_Rules">Règles
|
||||
dédiées au Finalizers</A></U></FONT></FONT> : Ce
|
||||
groupe contient les règles en rapport avec le codage des
|
||||
« <B>Finalizers</B> ».</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Unused_Code_Rules">Règles
|
||||
dédiées au code non utilisé</A></U></FONT></FONT>
|
||||
: Ce groupe contient une collection de règles qui ont pour
|
||||
but de trouver le code non utilisé.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0.19in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Controversial_Rules">Règles
|
||||
controversées</A></U></FONT></FONT> : Contient les règles
|
||||
qui ne jouissent pas d’une unanimité sur l’intérêt
|
||||
de leur application, elles sont séparées des autres
|
||||
règles pour pouvoir donner à l’utilisateurs de PMD
|
||||
la possibilité des les appliquer ou pas.</P>
|
||||
</UL>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-left: 1.35in; margin-top: 0.19in; margin-bottom: 0.19in">
|
||||
Parmi les règles contenus dans ce groupe :</P>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-top: 0.19in; margin-bottom: 0in">
|
||||
AtLeastOneConstructor : cette règle vérifie
|
||||
si la classe possède un constructeur au minimum.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0.19in">
|
||||
SingularField : un champs de classe utilisé
|
||||
uniquement par une seule méthode peut être remplacé
|
||||
par une variable locale à la méthode.</P>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0.19in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Optimization_Rules">Règles
|
||||
d’optimisation</A></U></FONT></FONT> : Ce groupe de règles
|
||||
à pour but d’imposer les bonnes pratiques de codage qui ont
|
||||
pour but d’optimiser les performances du code, par exemple :</P>
|
||||
</UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in">AvoidInstantiatingObjectsInLoops :
|
||||
Détecte les endroits où il existe des
|
||||
instanciation d’objets dans une boucle.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0.19in">
|
||||
UseStringBufferForStringAppends : Détecte les
|
||||
endroit du code où il y a une concaténation de
|
||||
chaînes de caractère et conseille d’utiliser des
|
||||
StringBuffers pour faire cette opération car c’est plus
|
||||
rapide à l’exécution.</P>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<UL>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Basic_Rules">Règles
|
||||
basiques</A></U></FONT></FONT> : Ce groupe contient un ensemble
|
||||
de bonnes pratiques que chaque un se doit de respecter.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Design_Rules">Règles
|
||||
de conception</A></U></FONT></FONT> : Ce groupe contient un
|
||||
certain nombre de règles qui détectent les zones
|
||||
floues de la conception du code audité.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Strict_Exception_Rules">Règles
|
||||
relatives aux exceptions</A></U></FONT></FONT> : Ce groupe
|
||||
contient les règles relatives à la capture et au
|
||||
renvoi d’exceptions.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#JavaBean_Rules">Règles
|
||||
relatives aux JavaBeans</A></U></FONT></FONT> : Ce groupe contient
|
||||
les règles qui détectent les JavaBeans qui ne
|
||||
respectent pas les règles de codage de ce type de classes.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#java_lang_String_Rules">Règles
|
||||
relatives aux java.lang.String</A></U></FONT></FONT> : Ce groupe
|
||||
contient les règles qui démontrent les différents
|
||||
problèmes qui peuvent apparaître lors de la
|
||||
manipulation des objets de type java.lang.String.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Code_Size_Rules">Règles
|
||||
relatives à la taille du code</A></U></FONT></FONT> : Ce
|
||||
groupe contient les règles qui contrôlent la taille des
|
||||
différentes composantes du code.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Import_Statement_Rules">Règles
|
||||
relatives au imports</A></U></FONT></FONT> : Ce groupe contient
|
||||
les règles relatives à l’optimisation des imports.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Clone_Implementation_Rules">Règles
|
||||
relative à l’utilisation de la méthode Clone()</A></U></FONT></FONT> :
|
||||
Ce groupe contient les règles qui détectent les
|
||||
éventuels problèmes qui peuvent être rencontrés
|
||||
lors d’une mauvaise utilisation de la méthode <B>Clone()</B>.
|
||||
</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Naming_Rules">Règles
|
||||
de nommage</A></U></FONT></FONT> : Ce groupe contient les règles
|
||||
qui s’occupent de vérifier les différentes règles
|
||||
de nommage des composantes du code.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Java_Logging_Rules">Règles
|
||||
relatives aux logs</A></U></FONT></FONT> : Ce groupe contient les
|
||||
règles qui régissent les logs de l’application.</P>
|
||||
<LI><P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0.19in"><FONT COLOR="#0000ff"><FONT FACE="Arial, sans-serif"><U><A CLASS="western" HREF="http://pmd.sourceforge.net/rules/index.html#Braces_Rules">Règles
|
||||
relatives aux accolades</A></U></FONT></FONT> : Contient un groupe
|
||||
de règles relatives à la disposition des accolades.</P>
|
||||
</UL>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-left: 0.25in; margin-bottom: 0in">
|
||||
<BR>
|
||||
</P>
|
||||
<P LANG="fr-FR" CLASS="western" STYLE="margin-bottom: 0in"><BR>
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,100 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
version=$1
|
||||
|
||||
pmd_top_dir=~/tmp
|
||||
pmd_bin_dir=$pmd_top_dir/pmd-$version
|
||||
pmd_src_dir=$pmd_top_dir/pmd-$version
|
||||
pmd_tmp_dir=$pmd_top_dir/pmd-tmp
|
||||
|
||||
echo
|
||||
echo "Rebuilding everything"
|
||||
echo
|
||||
|
||||
cd ..
|
||||
ant -f bin/build.xml dist
|
||||
|
||||
echo
|
||||
echo "Press [enter] to generate docs"
|
||||
|
||||
read RESP
|
||||
./docs.sh all
|
||||
|
||||
cd etc
|
||||
|
||||
echo
|
||||
echo "generating binary file $pmd_top_dir/pmd-bin-$version.zip"
|
||||
echo
|
||||
|
||||
rm -rf $pmd_bin_dir
|
||||
rm -f $pmd_top_dir/pmd-bin-$version.zip
|
||||
mkdir -p $pmd_bin_dir/etc
|
||||
mkdir $pmd_bin_dir/bin
|
||||
mkdir $pmd_bin_dir/lib
|
||||
mkdir -p $pmd_bin_dir/java14/lib
|
||||
mkdir $pmd_bin_dir/java14/bin
|
||||
cp ../LICENSE.txt changelog.txt $pmd_bin_dir/etc
|
||||
cd ../bin/
|
||||
cp pmd.* cygwin-run.sh build.xml cpd.sh cpdgui.bat designer.* $pmd_bin_dir/bin
|
||||
cd ../etc/
|
||||
cp ../java14/lib/*.jar $pmd_bin_dir/java14/lib/
|
||||
cp ../java14/bin/*.bat ../java14/bin/*.sh $pmd_bin_dir/java14/bin/
|
||||
chmod 755 $pmd_bin_dir/java14/bin/*
|
||||
cp ../lib/pmd-$version.jar ../lib/asm-3.1.jar ../lib/jaxen-1.1.1.jar ../lib/junit-4.4.jar $pmd_bin_dir/lib/
|
||||
mkdir $pmd_bin_dir/etc/xslt
|
||||
cp xslt/*.xslt xslt/*.js xslt/*.gif xslt/*.css $pmd_bin_dir/etc/xslt/
|
||||
cp -R ../target/docs $pmd_bin_dir
|
||||
cd $pmd_top_dir
|
||||
zip -q -r pmd-bin-$version.zip pmd-$version/
|
||||
cd -
|
||||
|
||||
echo
|
||||
echo "binary package generated"
|
||||
echo
|
||||
|
||||
release_tag=`echo $version|sed -e "s/\./_/g"`
|
||||
|
||||
echo
|
||||
echo
|
||||
echo "Type \"yes\" to tag svn repository using 'pmd_release_$release_tag'"
|
||||
|
||||
read RESP;
|
||||
|
||||
if [ "$RESP" = "yes" ]; then
|
||||
echo
|
||||
echo "Tagging release using"
|
||||
echo "svn copy -m \"$version release tag\" https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_$release_tag"
|
||||
echo
|
||||
svn copy -m "$version release tag" https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_$release_tag
|
||||
else
|
||||
echo
|
||||
echo "Skipping svn tag!!!"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "generating source file $pmd_top_dir/pmd-src-$version.zip"
|
||||
|
||||
rm -rf $pmd_src_dir
|
||||
rm -f $pmd_top_dir/pmd-src-$version.zip
|
||||
cd ../bin/
|
||||
ant jarsrc
|
||||
cd ..
|
||||
svn -q export https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_$release_tag $pmd_src_dir
|
||||
cp lib/pmd-src-$version.jar $pmd_src_dir/lib/
|
||||
cp lib/pmd-$version.jar $pmd_src_dir/lib
|
||||
cp -R target/docs $pmd_src_dir
|
||||
rm -f $pmd_src_dir/etc/clover.license
|
||||
cd $pmd_top_dir
|
||||
zip -q -r pmd-src-$version.zip pmd-$version/
|
||||
cd -
|
||||
|
||||
echo
|
||||
echo "source package generated"
|
||||
echo
|
||||
|
||||
echo "Use the command below to upload to sourceforge"
|
||||
echo
|
||||
echo "lftp -e \"mput -O incoming/ $pmd_top_dir/pmd-src-$version.zip $pmd_top_dir/pmd-bin-$version.zip\" upload.sourceforge.net"
|
||||
|
||||
+113
-42
File diff suppressed because it is too large.
Load diff
@@ -1,13 +1,15 @@
|
||||
/* JSP Parser for PMD.
|
||||
/* JSP Parser for PMD.
|
||||
* It supports supports more-or-less well written JSP files.
|
||||
* The JSP Document style is supported, except for inline DTD.
|
||||
* The JSP Page style (<% ... %>) is supported.
|
||||
* Java code is not parsed.
|
||||
* Script code inside <script> ... </script> is not parsed.
|
||||
*/
|
||||
|
||||
options {
|
||||
USER_CHAR_STREAM = true;
|
||||
NODE_USES_PARSER=true;
|
||||
UNICODE_INPUT=true;
|
||||
|
||||
IGNORE_CASE = true;
|
||||
STATIC = false;
|
||||
@@ -19,7 +21,7 @@ options {
|
||||
PARSER_BEGIN(JspParser)
|
||||
/**
|
||||
* JSP Parser for PMD.
|
||||
* @author Pieter – Application Engineers NV/SA – http://www.ae.be
|
||||
* @author Pieter Application Engineers NV/SA http://www.ae.be
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.jsp.ast;
|
||||
@@ -78,6 +80,7 @@ PARSER_END(JspParser)
|
||||
* - JspExpressionState : inside an expression <%= ... %>
|
||||
* - JspDeclarationState : inside a declaration <%! ... %>
|
||||
* - JspCommentState : inside a comment <%-- ... --%>
|
||||
* - HtmlScriptContentState : inside an HTML script <script> ... </script>
|
||||
*/
|
||||
|
||||
|
||||
@@ -263,6 +266,18 @@ PARSER_END(JspParser)
|
||||
| < COMMENT_TEXT: (~[]) >
|
||||
}
|
||||
|
||||
<HtmlScriptContentState> TOKEN :
|
||||
{
|
||||
<HTML_SCRIPT_CONTENT: (~[]) >
|
||||
| <HTML_SCRIPT_END_TAG : "</script" | "</Script" | "</SCRIPT">
|
||||
{
|
||||
// We've done a custom lookahead for the closing </script> and found it.
|
||||
// Put it back into the input stream, so it can be processed normally.
|
||||
input_stream.backup(8);
|
||||
image.setLength(image.length() - 8); // kill the "<script"
|
||||
matchedToken.image = image.toString();
|
||||
} : AfterTagState
|
||||
}
|
||||
|
||||
/** ******************************************************************** */
|
||||
/** ************************* JSP GRAMMAR **************************** */
|
||||
@@ -498,9 +513,20 @@ void Element() :
|
||||
(Attribute())*
|
||||
(
|
||||
(<TAG_END>
|
||||
{ jjtThis.setEmpty(false); }
|
||||
{
|
||||
jjtThis.setEmpty(false);
|
||||
|
||||
// Content in a <script> element needs special treatment (like a comment or CDataSection).
|
||||
// Tell the TokenManager to start looking for the body of a script element. In this
|
||||
// state all text will be consumed by the next token up to the closing </script> tag.
|
||||
// This is a context sensitive switch for the token manager, not something one can
|
||||
// express using normal JavaCC syntax. Hence the hoop jumping.
|
||||
if ("script".equalsIgnoreCase(startTagName.image)) {
|
||||
token_source.SwitchTo(HtmlScriptContentState);
|
||||
}
|
||||
}
|
||||
|
||||
(Content())?
|
||||
(HtmlScript() | Content())?
|
||||
|
||||
<ENDTAG_START>
|
||||
endTagName = <TAG_NAME>
|
||||
@@ -645,3 +671,16 @@ void DoctypeExternalId() :
|
||||
{ jjtThis.setUri(quoteContent(systemLiteral.image)); }
|
||||
)
|
||||
}
|
||||
|
||||
void HtmlScript() :
|
||||
{
|
||||
StringBuffer content = new StringBuffer();
|
||||
Token t;
|
||||
}
|
||||
{
|
||||
(t = <HTML_SCRIPT_CONTENT> { content.append(t.image); })*
|
||||
<HTML_SCRIPT_END_TAG>
|
||||
{
|
||||
jjtThis.setImage(content.toString().trim());
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
Please see the documentation in the docs directory or at http://pmd.sf.net/.
|
||||
|
||||
Using PMD? Get the book! http://pmdapplied.com/
|
||||
Loaded 30 of 281 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user