Commit Graph
5961 Commits
Author SHA1 Message Date
Brian Remedios 1b6aab7a3e path fixes for Java rules
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6641 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-19 18:39:27 +00:00
Brian Remedios 562a7ec74a Updated paths to Java rules, cleaned up formatting.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6640 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-19 18:34:49 +00:00
Brian Remedios 4d19a0632a Forgot to update this one as well...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6639 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-19 01:07:46 +00:00
Brian Remedios 302ba97ed0 update to be able to detect xPath rules from the others
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6638 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-19 01:00:01 +00:00
Ryan Gustafson 557b648e8c Better exception handling.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6636 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 21:18:21 +00:00
Brian Remedios d1a9bf3251 new function added, cleanup existing
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6635 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 17:51:01 +00:00
Brian Remedios abb75f6d25 new utility method added
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6634 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 17:25:22 +00:00
Ryan Gustafson c1c74ad02b Enhanced logging in the ClassTypeResolver to provide more detailed messaging.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6633 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 05:20:02 +00:00
Ryan Gustafson bf0b53fa7a When bulk processing, clear the RuleContext LanguageVersion prior to processing a file. This will be automatically determined as necessary. JavaDoc clarified in this regard. With this change, heterogeneous RuleSets can be processed agains heterogeneous collections of files. Finally!
Remove unnecessary PMD.processFiles method, use the static entry point instead for bulk processing.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6631 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 04:11:32 +00:00
Ryan Gustafson fb1b6cc630 Refactor SimpleRuleSetNameMapper to understand the Language prefix. For example 'basic' is now 'java-basic'.
Refactor all RuleSet XMLs into a Language subdirectory.  The 'rulesets.properties' file can be found in each directory.  The RuleSetFactory when asking for all registered RuleSets will use the 'rulesets.properties' file for each Language with Rule support.

All regression tests updated to use Language scoped short names, instead of old style.

Renamed the new 'useless' ruleset to 'unnecessary', as it is a more mild term.

Various parts of the documentation and the release scripts will need updating to account for the new treatment of 'rulesets.properties', and ruleset naming.  This can be done later, when all documentation is given a thorough thrashing. ;)


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6630 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-18 03:27:58 +00:00
Xavier Le Vourch 90bbf701a5 Java grammar fix: TypeParameter name wasn't set
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6628 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-17 17:18:45 +00:00
Ryan Gustafson acf09d38a8 Add ruleset folder for Java and JSP languages.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6627 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-17 02:22:27 +00:00
Xavier Le Vourch 7ebaf3a37b new "dogfood" rulesets for the regression suite
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6624 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 20:18:54 +00:00
Xavier Le Vourch a84a628198 code cleanup: junit rules applied on regress classes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6623 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 18:08:23 +00:00
Xavier Le Vourch a61c44a5e6 code cleanup: junit rules applied on regress classes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6622 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 17:56:04 +00:00
Xavier Le Vourch 31152d3499 code cleanup: assertTrue(!<expr>) -> assertFalse(<expr>)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6621 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 17:39:10 +00:00
Xavier Le Vourch fd4757152b fix for encoding test: charset was UTF8 in one instance, UTF-8 in the other,
use of Charset.forName() solves the issue.

use assertEquals() instead of assertTrue(x.equals(y))


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6620 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 16:43:24 +00:00
Brian Remedios f265d2e219 updated rule configs per package name changes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6619 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 08:45:39 +00:00
Brian Remedios 0670430269 updated rule configs per package name changes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6618 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 08:39:53 +00:00
Brian Remedios a116b7b041 Updates to accommodate new property mgmt scheme
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6617 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 06:47:07 +00:00
Brian Remedios f3c952be2e Initial upgrade to new property mgmt scheme, much more to follow.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6616 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 06:12:08 +00:00
Ryan Gustafson d1e9e44fda Completed refactoring of PMD configuration state into the Configuration class. Both CommandLineOptions and the AntTask refactored to initialize a Configuration instance as needed. This results in much improved defaulting of common settings and behavior between the command line and Ant task.
Remove many redundant "process" methods from the PMD class.  Use of a Configuration object removes the need for so any variants.

Renamed the 'cpus' option to 'threads', for both command line and Ant.

Changed the 'lang' option to 'version', for both command line and Ant.  The option can be specified repeated to change what LanguageVersion to use for any given Language.  For Ant, use <version> child element.  Reworked the way PMD processes to let the Languages of the Rules in the RuleSets drive the processing, instead of the previous single language.

It should now be technically possible to process multiple Languages in the same RuleSet on a list of mixed Language files.  However, I still need to create tests for this scenario to verify it is working as expected.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6615 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-15 05:10:43 +00:00
Ryan Gustafson b9e32ef88f Reformat to coding conventions so subsequent diff will be easier to read.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6614 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 23:28:32 +00:00
Xavier Le Vourch d8d7a7a007 use UTC format for date info in plugin version
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6613 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 17:47:21 +00:00
Xavier Le Vourch 546b4a9e88 new script to update the version consistently. It is of the form <version>.v<YYYYMMDDHHMM>
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6612 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 17:42:06 +00:00
Xavier Le Vourch 5f2a8350db PMD 5.0 conversion of eclipse plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6611 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 07:29:13 +00:00
Xavier Le Vourch a8ddb4bb9e PMD 5.0 conversion of eclipse plugin: using java 1.5 compiler
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6610 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 07:09:57 +00:00
Xavier Le Vourch ba8cc4f270 PMD 5.0 conversion of eclipse plugin: temporary conversion of PMD calls
The only remaining errors are related to the property descriptors


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6609 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 07:08:39 +00:00
Xavier Le Vourch b4c3780441 PMD 5.0 conversion of eclipse plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6608 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 03:38:06 +00:00
Xavier Le Vourch e4f4eea21d code cleanup: generics warnings since code is now compiled with java 1.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6607 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 03:10:51 +00:00
Xavier Le Vourch 4cd2019c00 code cleanup: generics warnings since code is now compiled with java 1.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6606 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 02:55:34 +00:00
Xavier Le Vourch 35088adb03 start of PMD 5.0 conversion of eclipse plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6605 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 00:15:28 +00:00
Xavier Le Vourch 7029489932 start of PMD 5.0 conversion of eclipse plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6604 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 00:12:24 +00:00
Xavier Le Vourch 62af77b02d update to PMD 5.0 snapshot (build 6596) and java 1.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6603 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-14 00:10:34 +00:00
Xavier Le Vourch e233091080 3.2.5 release, based on PMD 4.2.4
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6600 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-13 18:54:32 +00:00
Xavier Le Vourch 87a6940645 update to PMD 4.2.4
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6599 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-13 18:30:37 +00:00
Ryan Gustafson 6054ef3c1e Cleanup the RuleSetFactory so that ClassLoader is an instance field, instead of a method argument. This removes 3 wrapper methods from the API, and a bunch of internal parameter passing. Resulting API is very much simpler.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6593 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-12 10:21:18 +00:00
Xavier Le Vourch e129bed663 Fixed patch 2075906 - Add toString() to the rule UnnecessaryWrapperObjectCreation
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6592 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-11 18:42:30 +00:00
Ryan Gustafson 8bef2761e9 Correct issue passing report parameters to Renderer.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6590 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-11 04:43:30 +00:00
Ryan Gustafson 7124011961 Correct issue with excluding of SCCS directory (was inverted, matching only that directory). Also add more toString() on the FilenameFilters.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6589 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-11 04:17:34 +00:00
Ryan Gustafson f502ee3a12 Rename SourceFileSelector to LanguageFilenameFilter. Delete SourceFileOrDirectoryFilter. Move DataSource finding code from the PMD class into FileUtil.
Overall, nice bit of cleanup and removal of code from the PMD class into a reusable utility (used by PMD and the Benchmark program).

Added a FUTURE marker as we still need to figure out a way to deal with excluding certain directories, the hard-coded "SCCS" is still in place.  Thankfully this only applies to command line usages, and not Ant.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6588 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-10 06:09:57 +00:00
Ryan Gustafson 2073b275cf Refactor SourceFileSelector into lang package.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6587 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-10 03:18:39 +00:00
Ryan Gustafson 354519f879 Fix to support EOLs different from the current System's.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6586 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-10 02:14:14 +00:00
Ryan Gustafson 178a0a10e5 New Rule: Import ruleset: UnnecessaryFullyQualifiedName
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6585 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-09 00:30:53 +00:00
Xavier Le Vourch 2a9a5a289e 'What's new in PMD 5.0' links to Hudson's changes page for the snapshot
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6584 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-08 15:49:53 +00:00
Xavier Le Vourch 9cf0cead65 web site updates to link to the download location for the daily Hudson CI snapshot
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6582 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-07 22:52:36 +00:00
Xavier Le Vourch c4ab6882f8 automatic snapshot updates:
1) src and bin packages are available in hudson setup, no need to upload to sf.net

(see http://hudson.brittanysoftware.com/job/PMD-snapshot/)

2) maven snapshots are not versioned


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6581 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-07 20:04:16 +00:00
Xavier Le Vourch 7189d805b6 renderers cleanup: consistent handling of EOL.
EOL was generated before violations and then again outside the renderer at
the end of the report.

side effect: ant task is now silent if there is no violation to be consistent
with ant common practices.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6580 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-07 15:46:11 +00:00
Xavier Le Vourch 748faacab0 release process update: mvn site:deploy doesn't work... using rsync over ssh
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6579 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-07 15:34:25 +00:00
Xavier Le Vourch 9903991b77 release process updates to reflect changes in sf.net access
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6578 51baf565-9d33-0410-a72c-fc3788e3496d
2008-10-07 06:06:33 +00:00