5847 Commits

Author SHA1 Message Date
Xavier Le Vourch
ac71bd22e5 eclipse plugin reorganization: feature renamed net.sourceforge.pmd.eclipse as update
site doesn't work with net.sourceforge.pmd.eclipse.feature


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6509 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-26 06:41:36 +00:00
Xavier Le Vourch
18757bc8e5 new version: 3.2.5.v200809252215 to be used to test plugin. It will be available
in eclipse.beta update site:

  http://pmd.sourceforge.net/eclipse.beta/



git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6508 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-26 05:26:39 +00:00
Xavier Le Vourch
fbb70a65bd eclipse plugin reorganization
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6507 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-26 05:23:00 +00:00
Xavier Le Vourch
9a9e723746 code cleanup: unused imports
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6506 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-26 02:29:41 +00:00
Xavier Le Vourch
f0e9d13547 eclipse plugin reorganization
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6505 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-26 00:31:32 +00:00
Xavier Le Vourch
8c72bbb2ac eclipse plugin reorganization
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6504 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-25 23:57:57 +00:00
Xavier Le Vourch
f7371ac0de eclipse plugin reorganization
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6503 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-25 23:45:36 +00:00
Xavier Le Vourch
c54f51b530 eclipse plugin reorganization
first of several commits to make sure the plugin can be generated in headless
mode from ant


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6502 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-25 23:18:33 +00:00
Xavier Le Vourch
90264d6cb8 absolute paths replaced by
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6501 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-22 23:07:31 +00:00
Xavier Le Vourch
f2014126b0 settings to enable building eclipse plugin using ant (from within eclipse itself so far)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6500 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-22 22:33:30 +00:00
Xavier Le Vourch
7bab6411d7 installing saxon9.jar in local repository as it's not in standard repositories
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6499 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-19 16:22:03 +00:00
Ryan Gustafson
089e5d40ad Correct package spelling.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6498 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-19 07:38:22 +00:00
Ryan Gustafson
4f9a67c710 Correct package spelling.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6497 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-19 06:40:59 +00:00
Ryan Gustafson
c0fc8a84d1 Allow the Attribute class to expose the original underlying type/value, instead of only exposing as a String. This is needed for XPath 2.0 support, so that attributes can have the proper type. The AttributeNode class is updated accordingly.
There are still issues with running existing rules as XPath 2.0, but this brings things closer.  Some of the issues may be due to incompatibilities with XPath 1.0, or to some as yet unfixed problem.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6496 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 09:17:50 +00:00
Ryan Gustafson
87f754f1b3 Remove unused import.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6495 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 07:42:56 +00:00
Ryan Gustafson
3bbd95d420 Remove unused local variable.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6494 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 07:34:50 +00:00
Ryan Gustafson
b63f8a55e5 XPathRule version default should be 1.0, not 2.0.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6493 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 07:20:20 +00:00
Ryan Gustafson
2990661b5f Add Saxon to Eclipse classpath.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6492 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 06:21:16 +00:00
Ryan Gustafson
66283d5da4 Add support for XPath 2.0 and XPath 1.0 compatibility using Saxon. This is implemented using the Saxon OM classes, for good performance. Existing PMD XPath functions are refactored to be compatible with Saxon's extension support. The functions are exposed using 'pmd' and 'pmd-java' namespace prefixes, while these prefixes cause no issues for Jaxen, they are required by Saxon.
If you want to experiment using XPath 1.0 compatibility mode, simply change the default index on the 'version' enum property in XPathRule to a 1.  All Rules work properly in this mode using Saxon.  RuleChain is not in use, so performance is not currently as good as Jaxen, but it's not horrendous either.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6491 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 06:17:42 +00:00
Ryan Gustafson
a3efb90211 Add SaxonB 9.1.0.2b. Also an Ant script which removes the TransformerFactory file, which if not removed causes Saxon to be used instead of the JVM default. SaxonB is not schema aware, but Xerces is. Changing how all XML processing is done is more than PMD should be dictating to any code which uses with PMD, thus this minor tweak to the Saxon jar.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6490 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-18 05:53:52 +00:00
Ryan Gustafson
dd3e4d1b1f Remove empty packages that have been refactored already.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6489 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-17 03:30:25 +00:00
Ryan Gustafson
28c1c9437e Remove empty packages that have been refactored already.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6488 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-17 03:23:54 +00:00
Ryan Gustafson
93b9f18764 Remove incorrect @Override annotation, move method above java.lang.Object overrides instead of at end of file.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6487 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-17 03:08:14 +00:00
Xavier Le Vourch
4baa8866be code cleanup: javadoc warnings, use {@inheritDoc} tag
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6483 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-15 06:54:00 +00:00
Brian Remedios
8cd51f218b dogfood bugfix
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6482 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-15 05:12:55 +00:00
Brian Remedios
be36b08115 Partial update to allow easier property descriptor integration with XPATH rules. All property types can return any additional attributes in map.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6481 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-15 04:19:49 +00:00
Xavier Le Vourch
37577e7c68 retroweaver was updated to 2.0.6
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6480 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-14 04:05:10 +00:00
Xavier Le Vourch
3d992a4001 reorganization:
`pmd' target was removed

`qa' target can do most of the checks prior to generating a new release
(it's also used by the continuous integration setup)


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6479 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 17:52:42 +00:00
Ryan Gustafson
9314f35494 Refactor XPathRule, to support a "version" property (currently defaulting to 1.0), which will cause an underlying XPathRuleQuery to be used to handle the XPath query. The current XPathRule logic is moved into JaxenXPathRuleQuery, for 1.0 version. A SaxonXPathRuleQuery is added, for handling 2.0 and 2.0 compatibility mode versions. The Saxon implementation will be completed in a future commit.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6478 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 07:15:18 +00:00
Ryan Gustafson
97df3571b2 Upgrade Retroweaver to 2.0.6. Some of the upcoming changes for XPath 2.0 use some of the Integer functions added in 2.0.6 (e.g. Integer.signum).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6477 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 06:13:36 +00:00
Ryan Gustafson
bb25fc773a Rename Node.getAsXml() to Node.getAsDocument(), which is a more accurate naming.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6476 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 06:04:21 +00:00
Ryan Gustafson
6cb5ffae77 Remove "pmd" target, which doesn't seem to be used. "pmdOnPmd" is the equivalent.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6475 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 05:57:32 +00:00
Ryan Gustafson
4eec4cdd51 Rename Node.getAsXml() to Node.getAsDocument(), which is a more accurate naming.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6474 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-13 05:47:17 +00:00
Xavier Le Vourch
7e22318763 new internal ruleset for pmd specific rules that may not apply to
general purpose Java code.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6473 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-11 20:25:08 +00:00
Xavier Le Vourch
7f25760ba1 code cleanup: javadoc warnings
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6472 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-11 17:04:39 +00:00
Xavier Le Vourch
20ee70ae16 code cleanup: x.getClass().equals(ASTxxx.class) replaced by x instanceof ASTxxx.
I used the XPath expression below to detect most cases but I don't think it's
general enough to create a new rule...

//PrimaryExpression[
(
PrimaryPrefix[Name[ends-with(@Image, 'getClass')]] or
PrimarySuffix[@Image='getClass'])
and
PrimarySuffix[Arguments[count(ArgumentList)=0]]
and
PrimarySuffix[@Image='equals']
and
PrimarySuffix/Arguments/ArgumentList/Expression/PrimaryExpression/PrimaryPrefix
/ResultType/Type/ReferenceType/ClassOrInterfaceType
]


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6471 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-11 16:36:07 +00:00
Xavier Le Vourch
4119862e6d code cleanup: use ASTLiteral.isStringLiteral()
new property 'minimumLength' instead of hard coded minimum value

reformatting


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6470 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-11 07:13:10 +00:00
Xavier Le Vourch
364fc5e4a9 code cleanup: use of ASTLiteral.isStringLiteral()
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6469 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-11 06:42:38 +00:00
Xavier Le Vourch
69a1b7f0c0 Fixed ClassCastException in symbol table code
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6467 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-10 19:45:33 +00:00
Xavier Le Vourch
3765c30c99 Fixed ClassCastException on generic method in BeanMembersShouldSerialize
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6465 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-10 18:30:57 +00:00
Xavier Le Vourch
c2cc486c36 cleanup
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6464 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-10 18:29:13 +00:00
Romain Pelisse
dd1cd332a4 Code upgrade advised by Ryan:
* Using Language.commaSeparatedTerseNames(Language.findWithRuleSupport()), rather than specific method (which has been removed)
* Getting ride off findByExactName, keeping only the "ignoreCase" one.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6463 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 20:41:27 +00:00
Brian Remedios
3a2155727a grammar fixes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6462 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 05:26:33 +00:00
Brian Remedios
1ca1a6fc67 misc test update
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6461 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 05:09:05 +00:00
Brian Remedios
84ed28daea minor refactoring
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6460 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 03:29:25 +00:00
Brian Remedios
5f95b5a799 New property descriptor constructors for single-value types that accept string values to simplify external/factory usage
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6459 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 03:17:15 +00:00
Brian Remedios
1e2c6f2952 Property descriptor cleanup: rm obsolete isMultiValue flag, Javadocs, new interface for numerics
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6458 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-08 01:35:43 +00:00
Romain Pelisse
399a04a50b Job not done, until QA is done...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6457 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-07 01:55:18 +00:00
Romain Pelisse
b34658b57a Updating documentation on new command line usage
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6456 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-07 00:16:29 +00:00
Romain Pelisse
832c0c8401 Oops, forget something ...²
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6455 51baf565-9d33-0410-a72c-fc3788e3496d
2008-09-07 00:12:56 +00:00