5454 Commits

Author SHA1 Message Date
Ryan Gustafson
e4c2307bee Fix 1903578 - Ensure plugin XML element ids are unique with the document.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5815 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-28 02:19:08 +00:00
Ryan Gustafson
d0b4574c25 Changes to Workspace exclude/include patterns are now reflected on the Projects.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5814 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 23:17:41 +00:00
Ryan Gustafson
7ec60e57e3 Changes to Workspace exclude/include patterns are now reflected on the Projects.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5813 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 23:17:03 +00:00
Ryan Gustafson
a54b05b00a Changes to Workspace exclude/include patterns are now reflected on the Projects.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5812 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 23:16:41 +00:00
Ryan Gustafson
63bbc45c1d Changes to Workspace exclude/include patterns are now reflected on the Projects.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5811 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 23:16:24 +00:00
Ryan Gustafson
d98eb82208 Allow setting of entire list of exclude/include patterns on a RuleSet.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5810 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 21:47:26 +00:00
Ryan Gustafson
e99bde6f5f Message updates.
Last commit in the series.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5809 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 20:59:00 +00:00
Ryan Gustafson
34a7478ccb Update plugin version numbers in prep for next release.
Whole lotta UI updates.  See CHANGELOG.txt from pmd-eclipse project for full details.

This is Part 5 of a large series of commits.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5808 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 20:55:42 +00:00
Ryan Gustafson
787e30a954 Update plugin version numbers in prep for next release.
Use new standard PMD core ruleset serialization.
Provide java.io.File on RuleContext to support new PMD exclude/include mechanism.
Error type PMD Violations now show in Problems View for manual PMD invocations.
Use Rule references when building RuleSets, instead of Rule copies.
Add support for tracking RuleSet file on project properties.

Part 4 of a large series of commits.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5807 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 20:45:15 +00:00
Ryan Gustafson
303546c0cd Update plugin version numbers in prep for next release. Add trunk version of PMD, update once PMD 4.2 is out.
This is Part 3 of a large series of commits.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5806 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 19:53:47 +00:00
Ryan Gustafson
32929d250c Update plugin version numbers in prep for next release.
This is Part 2 of a large series of commits.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5805 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 19:49:46 +00:00
Ryan Gustafson
21c1d62926 Update plugin version numbers in prep for next release. Added TODO.txt initialized with thoughts on various things to look at in the future. Change log and release notes updated.
This is Part 1 of a large series of commits.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5804 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 19:49:00 +00:00
Ryan Gustafson
201f6b518c More detailed performance metric logging.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5803 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-27 19:41:09 +00:00
Romain Pelisse
8cfec413d6 Updating link to maven plugin homepage.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5802 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-25 09:44:45 +00:00
Ryan Gustafson
3a1878eef3 Add -nocloseonexit option to support not killing JVM when closing designer window. This will allow IDE plugins to launch the designer directly via Designer.main() instead of Runtime.exec().
Clean up split planes some.  Not perfect on the splits for the AST/Symbol table panel, either we're doing it wrong, or Swing is buggy (imagine that!).  I preferred my original 3 horizontal panels over this layout.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5801 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-22 21:31:35 +00:00
Ryan Gustafson
c6937c6e23 Fixed name/description (forgot I renamed to all-java after I remove the jsp rules).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5800 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-22 19:43:27 +00:00
Ryan Gustafson
2648bf6126 Added internal ruleset all-java.xml, useful for developer testing.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5799 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-22 19:24:47 +00:00
Xavier Le Vourch
18fc950807 missing since tags added, testAllPMDBuiltInRulesNeedSince test case now works
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5798 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-22 01:28:17 +00:00
Romain Pelisse
423d6df9e3 Corrected a defect, plus "pmdOnPmd" (added some suppresswarning when defect did not appear to be fixable)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5797 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-19 14:19:34 +00:00
Ryan Gustafson
65e6f4eec6 Add more 'since' attributes to Rules. Almost everyone in the JUnit test is covered. If you can figure out the remaining ones, please do so! I've mined the changelog.txt as much as I can.
Add some // FUTURE commments.

Missed a 42.xml entry for new Rule.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5796 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-19 10:55:13 +00:00
Ryan Gustafson
0a300e8860 Fix problem with appending null and boolean literals in InsufficientStringBufferDeclaration.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5795 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-19 08:32:11 +00:00
Ryan Gustafson
5469d135f7 Implement AvoidMultipleUnaryOperators as a Java rule to catch scenarios with arbitrary parentheses nesting.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5794 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-19 08:04:07 +00:00
Ryan Gustafson
0af168412b Add AvoidMultipleUnaryOperators rule.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5793 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-19 06:08:54 +00:00
Romain Pelisse
fddf5dd2e6 Bugfixe: 1866198 - PMD should not register global Logger
The modifications do not seems to cause regress issues, however, we will have to check during next release if those modifications do not cause regress in ant usage or command line usage.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5792 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 17:56:59 +00:00
Romain Pelisse
91fb31b5dd Correcting the example code
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5791 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 17:02:56 +00:00
Romain Pelisse
ecaffa8cb8 Typo and small fix
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5790 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 17:01:50 +00:00
Romain Pelisse
5945599897 Correcting a small defect in RegexHelper class.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5789 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 16:54:28 +00:00
Romain Pelisse
e8b984df71 Switching inheritance to AbstractJavaRule.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5788 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 16:54:04 +00:00
Ryan Gustafson
995df9ba9d Test case which currently throws NPE from the InsufficientStringBufferDeclaration rule. It is _not_ however causing JUnit to fail (not clear why!)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5787 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 10:18:36 +00:00
Ryan Gustafson
c24e7b09d2 Add since for 3.4 to 4.2.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5786 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 03:24:22 +00:00
Ryan Gustafson
e2e5acaa67 Added a 'since' attribute to Rules. This is the version of PMD in which a Rule was first delivered. This can help IDE users know what rules are new to PMD (e.g. I just upgraded my IDE plugin which was using PMD a.b and and PMD is now x.y, what rules are newer than a.b?).
All built-in PMD rules should have a value for this (added a JUnit test to that effect).  We need to go back and annotate all PMD rules with their original release version.  Looks like we have easy records going back to PMD 3.3, prior to that will require a bit of research in the SVN history I imagine.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5785 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 02:48:14 +00:00
Ryan Gustafson
6ee7b34a0f RuleReference will make a best effort to not considering the setting of the same value as an attempt to override. StringUtil.isSame() added to compare Strings, can pass options indicating to a) trim before compare, b) ignore internal whitespace, c) ignore case.
Also added some // FUTURE comments related to Rule/RuleSet cloning.  This would be a nice feature to have.  I'm seeing various Rule copying logic in the PMD eclipse plugin which could be reduced if PMD core supported a Rule deep copy semantic via clone().

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5784 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-18 02:06:19 +00:00
Romain Pelisse
68d8659f59 Applying patch for bug [ 1894821 ] False - for Test Class without Test Cases.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5783 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-16 10:42:56 +00:00
Romain Pelisse
310141fa71 Update on the rule, but still not working...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5782 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:11:31 +00:00
Romain Pelisse
c17da43741 Improving the RegexHelper method (simply preventing nullpointer exception).
Add some javadoc, always nice to have.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5781 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:10:51 +00:00
Romain Pelisse
1ef60c2cd1 Updating changelogs with last 3 bugfixes.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5780 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:08:45 +00:00
Romain Pelisse
b4706b49fd Fix for bug 1842505 - xml output incorrect for inner classes
plus some minor refactoring.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5779 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:08:03 +00:00
Romain Pelisse
4d3463c219 Fixed bug 1891399 - Check for JUnit4 test method fails
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5778 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:06:07 +00:00
Ryan Gustafson
5325eaab2f Add support for adding Rules to a RuleSet by reference. Useful for IDE plugins, which intend to allow defining custom RuleSets using existing Rules without the current copy semantics. Essentially, this lets us more easily do programmatically what we can already do in a hand-written XML.
For this to work, a Rule/RuleSet being added by Reference must have a file name associated with it. This information will be associated with the RuleSet when created by the RuleSetFactory using the APIs which provide file names/resources.  If a raw InputStream form is used, then the file name will need to be manually set.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5777 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:04:11 +00:00
Romain Pelisse
08f5509930 Fix for bug 1882457
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5776 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-15 19:03:30 +00:00
Romain Pelisse
37a0f03f2e Adding a test case to assert proper behavior when user does not provide configuration for showMethodsComplexity and showClassesComplexity. Default is resolved as "true". Test doesn't fail, it seems ok.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5775 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-14 13:03:43 +00:00
Romain Pelisse
6e97f66bf9 Small upgrade to CyclomaticComplexity. By default, the rule add two kind of violation (method violation, but also a class average complexity). Some user find that troublesome and it maybe messy if an aggregated report. So i had a simple configuration to the rule. I also had a couple of unit test to ensure proper behavior of this modification.
Code cleaning, switching inheritance to AbstractJavaRule.

Adding proper documentation to the new rule's properties.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5774 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-14 09:08:47 +00:00
Romain Pelisse
dd4b2b9112 Small upgrade to CyclomaticComplexity. By default, the rule add two kind of violation (method violation, but also a class average complexity). Some user find that troublesome and it maybe messy if an aggregated report. So i had a simple configuration to the rule. I also had a couple of unit test to ensure proper behavior of this modification.
Code cleaning, switching inheritance to AbstractJavaRule.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5773 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-14 09:06:49 +00:00
Romain Pelisse
17546aaa70 code cleaning (javadoc)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5772 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-14 08:35:44 +00:00
Romain Pelisse
d78d546f6a Code cleaning, switching inheritance from deprecated AbstractRule to AbstractJavaRule.
This did not broke any test, so it seems fine.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5771 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-14 08:34:15 +00:00
Ryan Gustafson
02510413f1 Use looser regex to cleanup the XML Declaration for DTD tests, to accommodate JDK6 use of 'standalone'.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5770 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-13 05:14:12 +00:00
Xavier Le Vourch
9d5b78a6b1 Designer: selecting an AST in the result list will highlist it in the code window too
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5769 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-13 04:29:04 +00:00
Ryan Gustafson
d456a8074f Comment out some debug System.out.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5768 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-13 04:04:23 +00:00
Ryan Gustafson
66e2c18261 Refactor MockRule to be part of PMD core, as an actual Rule implementation which does nothing is useful beyond just unit testing (e.g. in IDE plugin development).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5767 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-13 03:57:04 +00:00
Xavier Le Vourch
02eb9575e0 bug fix: invalide test case for TooFewBranchesForASwitchStatement
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5766 51baf565-9d33-0410-a72c-fc3788e3496d
2008-02-13 03:29:33 +00:00