987850f9aa
Added ability to export the current ruleset.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7036 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-17 21:10:22 +00:00
bfb8385e2b
New Ecmascript rule: ScopeForInVariable
...
Minor tweaks to EcmascriptNode/EcmascriptParser.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7035 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-16 11:04:31 +00:00
9cec051dcb
Add support for decorating PMD AST nodes. This is _not_ for Rules to use (really bad idea), but for external usages of the PMD AST building infrastructure, where the application is in control of the AST lifecycle. Basically a rip-off of DOM Level 3 set/getUserData API. Let's one put custom data directly on the nodes, instead of managing a node<-->data mapping externally.
...
Expose the underlying Rhino AST node on the EcmascriptNode. We're already intimately tied to the Rhino AST here anyway. Using the PMD AST gives you a _real_ visitor API not the do-nothing NodeVisitor the Rhino AST supports natively. With this change you can get at the underlying Rhino AST when really needed.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7034 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-15 08:40:31 +00:00
56e0c32334
Documentation update.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7032 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-14 00:33:58 +00:00
0de8b9cbb9
Missed applying the ParserOptions for Ecmascript.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7031 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-13 03:09:22 +00:00
bd070a57be
Refactor the LangaugeVersionHandlers to use an AbstractLanguageVersionHandler for common implementation.
...
Include the Document in the AST for the XML language. For some unknown reason I had been excluding it (on purpose it seems).
Added an AbstractXmlRule for Java based Rule implementations for XML language, not horribly useful, but is consistent with other languages. Also added AbstactDomXmlRule if one prefers to visit the DOM model.
Add the concept of ParserOptions. These are given to the Parsers to influence the manner in which the AST is produced. The XML and Ecmascript languages now both have parser options. Feedback welcome, perhaps the XML options should be removed?
ParserOptions are exposed as properties on XPath and Java based rules for the XML and Ecmascript languages. In the future, I'll change the PMD class to produce a separate AST for each unique ParserOption option. That requires dividing the Rules into equivalence classes based upon their ParserOptions (i.e. interrogation of RuleSets and division of labor). For now, only the LanguageVersion default ParserOptions will be used, so you cannot practically use these features on Rules unless you hack the code a bit. If you're using the Parsers directly, you can take advantage of this immediately.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7030 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-13 02:43:27 +00:00
321300cb2c
Update to newer version of Rhino CVS. Been a year and the patch I submitted (bugzilla 468396) still hasn't been applied, so this isn't a clean build from CVS. I've also got a patch to SwitchCase.getStatements() to return an empty array instead of null, which is consistent with other Rhino AST behaviors.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7029 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-12 21:12:58 +00:00
b6f25c6a0e
Added vararg to constructor so it matches with super constructor.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7028 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-12 16:22:39 +00:00
b936c21fae
Update to pmd 4.2.6, added code to let CPD parse files for all jEdit modes. Note this relies on a modification to AnyLanguage in CPD that is not yet in subversion but is in the pmd-4.2.6.jar included with this plugin.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7026 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-10 05:11:13 +00:00
9ec19acc85
Updated changelog to note Ecmascript is now supported by CPD.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7022 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-09 17:04:46 +00:00
aa76e75e10
Changed javascript to ecmascript.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7021 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-09 17:01:15 +00:00
8de42089d4
Renamed javascript to ecmascript.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7020 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-09 16:57:00 +00:00
47d2a38dea
Added javascript as a supported language for CPD.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7018 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-09 02:05:38 +00:00
f4b286f687
Add support for Unicode for JSP/JSF.
...
Add support to not parse body of <script> for JSP/JSF.
Add new NoInlineScript rule for JSP/JSF.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7017 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-05 22:51:55 +00:00
1a5e730cbb
Put hard-coded strings in properties file so they can be localized.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7014 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-05 17:25:18 +00:00
acd9383c56
Added dialog to let the user choose the types of files to run CPD against from the VFSBrowser.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7013 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-05 17:03:29 +00:00
1a560840be
Code clean up.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7012 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-04 17:13:12 +00:00
632fe9705a
fixing performance issue on PreserveStackTrace by removing use of descendant:: axis. See bug 1808110
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7011 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-04 14:54:59 +00:00
7cce040a53
Adding a new rule : GenericsNaming
...
Thanks to Nicolas Dordet for his inputs on this one.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7008 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-04 13:32:51 +00:00
3b35cf55af
adding a new XPath rule : AvoidAxisNavigation.
...
(Note that the description of the rule is from an email sent to me by Ryan Gustavson)
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7007 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-03 23:50:29 +00:00
0c6f1b04f5
Updates so CPD can check all supported files, not just Java files. CPD support JSP, PHP, Ruby, C/C++, and Fortran. This is not quite complete, still need to fix the CPD access from the File System Browser. CPD from the Plugins menu works now.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7006 51baf565-9d33-0410-a72c-fc3788e3496d
2009-12-03 06:19:27 +00:00
3aedf63a96
Fix for 2904832. ClassTypeResolver was clobbering the importedClasses in populateImports set by populateClassName. Changed to clobber at ASTCompilationUnit, then everyone adds to the map.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7004 51baf565-9d33-0410-a72c-fc3788e3496d
2009-11-27 18:10:15 +00:00
daee6c6983
adding a new language (xsl) to pmd plus a first rule (I actually have several more in mind).
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7003 51baf565-9d33-0410-a72c-fc3788e3496d
2009-11-18 15:53:01 +00:00
2d1f5c162d
new rule on use of ConcurrentHashMap obviously does not applied to pmd
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7002 51baf565-9d33-0410-a72c-fc3788e3496d
2009-11-14 16:54:26 +00:00
847b76b854
oups, forgot to add new rule to changelog.txt
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7000 51baf565-9d33-0410-a72c-fc3788e3496d
2009-11-14 15:50:25 +00:00
33f33e6e95
Adding a new rule 'UseConcurrentHashMap' to promote use of ConcurrentHashMap implementation in Java 5
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6999 51baf565-9d33-0410-a72c-fc3788e3496d
2009-11-14 15:49:41 +00:00
ba902fe1ed
Release 4.2.5.2.0
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6994 51baf565-9d33-0410-a72c-fc3788e3496d
2009-10-17 13:41:32 +00:00
1bc5759ec9
Release 4.2.5.2.0
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6993 51baf565-9d33-0410-a72c-fc3788e3496d
2009-10-17 13:37:59 +00:00
2121e42d21
Release 4.2.5.3.0
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6992 51baf565-9d33-0410-a72c-fc3788e3496d
2009-10-17 13:32:56 +00:00
2147870178
Release 4.2.5.3.0
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6991 51baf565-9d33-0410-a72c-fc3788e3496d
2009-10-17 13:29:47 +00:00
895b50723a
Release 4.2.5.3.0
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6990 51baf565-9d33-0410-a72c-fc3788e3496d
2009-10-17 13:29:11 +00:00
9dab4ff769
Fix bug 2832322 - cpd.xml file tag path attribute should be entity-encoded.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6989 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-16 13:26:04 +00:00
ba2d401fbc
Oups, this stateless crap of mine from my previous commit was erronous.
...
Rule are NOT recreated for each new source file, we need to clean the state of this object... Therefore I add this piece of code back.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6987 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-16 01:38:12 +00:00
a837cc5a8f
Fixing bug 2826119 - False +: DoubleCheckedLocking warning with volatile field
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6984 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-15 17:56:43 +00:00
0a52c2100c
indentation
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6983 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-15 17:54:50 +00:00
7a66c521a6
updating maven-site-plugin to lastest version
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6982 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-15 17:54:01 +00:00
2bd6c20c62
finally fixing bug 'wz-pmd-report.xslt in release 4.2.5 misses file name - ID: 2609540'
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6981 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-15 17:21:51 +00:00
dec39ce09c
Fixing bug 2835074 False -: DoubleCheckedLocking with reversed null check
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6977 51baf565-9d33-0410-a72c-fc3788e3496d
2009-08-15 16:01:33 +00:00
d04c4ba159
Duplicate changes made to 4.2.x.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6975 51baf565-9d33-0410-a72c-fc3788e3496d
2009-07-25 05:40:48 +00:00
3dddbb2a54
Display rule description along with example.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6973 51baf565-9d33-0410-a72c-fc3788e3496d
2009-07-25 05:22:48 +00:00
067c322be7
Added AvoidLosingExceptionInformation from George Thomas. Backport to 4.2.x to follow soon.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6971 51baf565-9d33-0410-a72c-fc3788e3496d
2009-07-21 01:40:27 +00:00
a7dd2548e8
Adding link to my own article, in French, on PMD
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6970 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-30 15:19:00 +00:00
d042895175
Removing this rule, I failed to implement it properly and I'm not so sure it will really be relevant
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6969 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-30 13:26:04 +00:00
94ceaa29f7
Adding a new rulesets to controversial.xml, with a couple of appropriate test case.
...
As it does not requires any special feature of PMD 5.0 I'll backport it - unless some of you truly disagree with this rule.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6967 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-29 08:23:56 +00:00
e2feebd9c0
Fixing bug 2810228 : updating cpd documentation.
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6966 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-22 14:30:47 +00:00
8667286499
use mvn quiet option
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6964 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-13 23:39:52 +00:00
4c953e51ee
obsolete //FUTURE removed
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6963 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-13 23:34:09 +00:00
9b57e891ef
obsolete // FUTURE tags removed
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6962 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-13 21:17:00 +00:00
9f2140cd2a
new Android rule DoNotHardCodeSDCard taken from my blog article on how to use PMD in Android projects
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6961 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-13 20:34:40 +00:00
282b90f111
code cleanup: javadoc warnings
...
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@6959 51baf565-9d33-0410-a72c-fc3788e3496d
2009-06-13 20:08:33 +00:00