5429 Commits

Author SHA1 Message Date
Romain Pelisse
e77489b37a Applied patch 1849474 - New property for PMD ant task
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5891 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-12 15:38:35 +00:00
Ryan Gustafson
c595c61edd Add -auxclasspath option for specifying Type Resolution classpath from command line.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5890 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-11 20:03:29 +00:00
Ryan Gustafson
e9ccc61428 Fix 1909929 - clean violation review is not selective enough
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5889 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-11 01:21:18 +00:00
Ryan Gustafson
8c0e1d6b3d Fix 1909929 - clean violation review is not selective enough
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5888 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-11 01:21:10 +00:00
Ryan Gustafson
1e810aa4e1 Correct logger class.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5887 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-10 08:53:19 +00:00
Ryan Gustafson
058b983b55 Don't die when selecting multiple projects, and one happens to be a non-Java project.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5886 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-10 06:59:34 +00:00
Ryan Gustafson
29ba46ce41 Don't puke on Classes in the default package.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5885 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-10 06:45:38 +00:00
Tom Copeland
758c7865ee Removed wrong link
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5884 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-08 17:03:40 +00:00
Xavier Le Vourch
7bfac6fd95 version updated to 3.2.4.v200803071500
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5883 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 23:06:44 +00:00
Xavier Le Vourch
9cdb5b2f8d version updated to 3.2.4.v200803071500
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5882 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 23:05:10 +00:00
Xavier Le Vourch
25fe8e6021 update to pmd 4.2rc1
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5881 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 22:40:03 +00:00
Xavier Le Vourch
36644e4a09 updates to release script
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5880 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 21:44:53 +00:00
Xavier Le Vourch
d4f47ac9ee 4.2rc1 download and what's new links
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5879 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 21:24:13 +00:00
Xavier Le Vourch
6b1b6324e4 preparing for 4.2rc1:
- version number and release date updated

- maven2.beta used for deployment as this release should not be mirrored
on official mvn mirrors.

The use of two maven repositories should be configurable based on version
info in release script.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5877 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 20:53:38 +00:00
Xavier Le Vourch
39901cacec etc/updating_rulesets.sh modified to exclude rulesets referencing other rulesets
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5876 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 20:46:48 +00:00
Xavier Le Vourch
9e077e2c12 maven complains about missing </p>
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5875 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 19:03:29 +00:00
Xavier Le Vourch
5f8bf04a34 version number displayed in AST viewer
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5874 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 01:59:30 +00:00
Xavier Le Vourch
9c4ef51364 retroweaver updated to version 2.0.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5873 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 00:36:25 +00:00
Xavier Le Vourch
569fd197fc version number displayed in cpd and designer guis
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5872 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 00:25:50 +00:00
Xavier Le Vourch
18ee21de3c version update to 4.2rc1
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5871 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-07 00:25:22 +00:00
Xavier Le Vourch
dfd7a984b0 AST cleanup: class ASTEnumElement removed as it's not used
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5870 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-06 03:28:20 +00:00
Ryan Gustafson
a11337cab4 Handle scenario where missing dependent classes causes PMD to explode.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5869 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-06 02:35:36 +00:00
Ryan Gustafson
7b7f854635 Add tests cases and support for operators and expressions.
ASTName is now carrying over the type from it's Declaration when possible.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5868 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-06 02:09:35 +00:00
Ryan Gustafson
065423d619 Add tests cases and support for unary and binary numeric promotion.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5867 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-06 00:15:04 +00:00
Ryan Gustafson
6aa4be951a Added more test cases for Type Resolution. Change so that test files are available both as .java and .class, this is really the only way to properly test Type Resolution.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5866 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 22:56:26 +00:00
Ryan Gustafson
4e78fbaba6 More TypeNodes, and fixes on ClassTypeResolver.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5865 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 22:53:29 +00:00
Xavier Le Vourch
541267c146 regeneration of Java Parser classes to reflect changes in grammar file.
using cvs version of JavaCC from March 05 2008


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5864 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 18:25:11 +00:00
Ryan Gustafson
8df01bae99 Update TODO comments for array treatment on allocation expressions (turns out to be more complex than I first thought).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5863 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 09:00:44 +00:00
Ryan Gustafson
65c6faf511 Update grammar to indicate basic literal type on the ASTLiteral class. Type Resolution can use this to determine the proper Java type (int, long, float, double, char, String) as needed.
This will break the build as I don't have the magic version of JavaCC used to generate the parser.  It's not JavaCC 4.0.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5862 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 08:40:13 +00:00
Ryan Gustafson
c05badf566 Comment and bug fix.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5861 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 06:38:52 +00:00
Ryan Gustafson
40a46d11a9 Vast expansion of Type Resolution scope on the AST to cover every possible (AFAIK) node which can meaningfully have a Type. Type information is being rolled up the AST to the top most nodes, based on expression and operator rules defined in the JLS.
The ternary operator, and PrimaryExpressions are not yet done.  This feature will not work very well until PrimaryExpression are handled, as this node appears very often.  A failure at this level could stop the progress of the rollup, seriously limiting utility.

Also, some Parser changes are needed to (1) annotate literals with their type, and (2) know the dimensionality of array types.

Yeah, need to write a boatload of test cases too. :)


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5860 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 06:36:33 +00:00
Ryan Gustafson
8253ad505c Change a bunch of the AST nodes to also be TypeNodes.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5859 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 06:22:49 +00:00
Xavier Le Vourch
765742556d local scope only for block statements, based on comments from Ryan
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5858 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 02:28:57 +00:00
Ryan Gustafson
2c5babd8c6 Reverse genericization of java.lang.Class due to incompatible changes w.r.t Java 5 and Java 6.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5857 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-05 01:58:00 +00:00
Ryan Gustafson
08bd834cd3 Refactor to add SimpleJavaTypeNode based class for TypeNode interface. Extracted an AccessNode interface and added base classes SimpleJavaAccessNode and SimpleJavaAccessTypeNode (will need this later one as I expand scope of Type Resolution).
Note: For now please do not change usages of AccessNode to be usages of SimpleJavaAccessNode so that class hierarchy compatibility is preserved.  We can do that post 4.2.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5856 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-04 22:22:16 +00:00
Ryan Gustafson
57d35ddb88 Add info about RuleChain for performance. Also, pre-commit instructions.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5855 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-04 21:49:01 +00:00
Xavier Le Vourch
7e71181ebe bug fix: local variables in constructors were created in the method scope
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5854 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-04 18:55:00 +00:00
Romain Pelisse
f3025e1624 Reducing rule priority. We can't say that call explicitly GC is going to "break" the application.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5853 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-04 11:42:02 +00:00
Romain Pelisse
49e28b8601 Adding a small documentation page about all the QA stuff and piece of knowledge, i have learn since i join the project.
I think this will be helpful (unless we decide to force every new commiter to read ALL the commit message since PM 1.0 ! :) )

Note: this page is far from being finished, so i didn't include it in the website navigation.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5852 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-04 11:07:19 +00:00
Xavier Le Vourch
6dc2a50686 optimization: DoNotCallGarbageCollectionExplicitly rewritten. The new implementation
only takes 40% of the time.

Note: when writing a new rule, using command line option "-benchmark" on a few rules
can give an indication on how the rule compares to others. To get the full picture,
use the rulesets/internal/all-java.xml ruleset with "-benchmark".

This rule was the slowest when running on the jdk source tree: it took 69s to complete.
The new version only takes 27s.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5851 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-03 23:34:11 +00:00
Xavier Le Vourch
1a6dffa690 bug fixes for AbstractClassWithoutAnyMethod:
test cases were not included correctly

abstract class with constructors should not raise a warning

incorrect test case


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5850 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-03 22:06:31 +00:00
Xavier Le Vourch
84235d0a29 another regression problem with AvoidReassigningParameters: incorrect warnings for local variables in constructors
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5849 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-03 21:14:22 +00:00
Xavier Le Vourch
3ff43ca4c8 regression in AvoidReassigningParameters: starting with 'this' or 'super' in not enough,
a '.' needs to be there too...

(found by regression test on jdk source)


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5848 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-03 20:13:17 +00:00
Romain Pelisse
0cb98fae1d Bug fix for 1902351 - AvoidReassigningParameters not identify parent field
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5847 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-03 13:36:05 +00:00
Xavier Le Vourch
17eb8a8ce8 temp file shouldn't have been included in last commit
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5846 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-02 19:59:37 +00:00
Xavier Le Vourch
25eb7d5bd3 new test case showing xml parsing problem that occurs only on Windows with the jdk 1.4 version. Test is not part of regression suite, use 'test14' target to run it
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5845 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-02 19:58:32 +00:00
Xavier Le Vourch
dd9ce02db8 refactoring: static method TestDescriptor.inRegressionTestMode() gets the 'pmd.regress' property
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5844 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-02 19:13:57 +00:00
Xavier Le Vourch
55a729a3f0 message parameter wasn't used in assertEqualsRuleSet()
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5843 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-02 18:40:22 +00:00
Xavier Le Vourch
3451f93a35 weird parsing problem only occuring for regress14 on Windows
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5842 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-02 04:45:23 +00:00
Xavier Le Vourch
3f93d2a5b6 version number moved: PMD <version> API
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5841 51baf565-9d33-0410-a72c-fc3788e3496d
2008-03-01 21:52:53 +00:00