5064 Commits

Author SHA1 Message Date
Wouter Zelle
a708221106 Reduced the log level since this Exception usually does not indicate a problem
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5506 51baf565-9d33-0410-a72c-fc3788e3496d
2007-10-04 14:10:50 +00:00
Wouter Zelle
1b4aef4e56 Fixed classname in warnings
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5505 51baf565-9d33-0410-a72c-fc3788e3496d
2007-10-04 12:23:53 +00:00
Tom Copeland
8625d13b0f Added a note about Amit's IDEA plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5504 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-28 00:30:55 +00:00
Tom Copeland
9186279f48 Added a note about Amit's IDEA plugin
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5503 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-28 00:22:42 +00:00
Romain Pelisse
680e59b147 A bunch of unit test i did a while ago... Those test are not very relevant, they were designed to reduce the "amount" of uncovered code, to allow emma report to be more usefull.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5502 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-21 09:48:15 +00:00
Romain Pelisse
f2c2420fc0 As discuted with Ryan Gustafson, changing the changelog entry on 'nicehtml' feature to announce that it will replace the "old" html output in a later release ( after 4.1 it is to say )
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5501 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-18 10:19:01 +00:00
Romain Pelisse
dc3d89e8e9 Fixes bug 1796928 and add proper unit test.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5500 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-18 09:39:21 +00:00
Romain Pelisse
ef075d1f26 Updating website's documentation to include information about the 'nicehtml' output and the associated possible override.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5499 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-17 17:42:59 +00:00
Romain Pelisse
404d4f2e9f Adding support to the PMD command line to allow override of the default XSL for 'nicehtml' ( also corrected a bug in this).
Also added some new example and data to the usage line.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5498 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-17 17:15:53 +00:00
Romain Pelisse
055f3d5c2b Added pmd (pmdOnPmd) to the build.
Removing abstract class from JUnit plugin ( does not fix the test though).

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5497 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-17 17:03:35 +00:00
Romain Pelisse
369e9d87fd Correcting a small defect in xslt ( line numbering ) for the new 'nicer html' report.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5496 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-17 16:07:32 +00:00
Romain Pelisse
9890c78343 Correcting a small defect in xslt ( line numbering )
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5495 51baf565-9d33-0410-a72c-fc3788e3496d
2007-09-17 16:04:56 +00:00
Romain Pelisse
4c542b8c86 Applied patch 1783047 - Maven 2 build
Adding new files for Maven 2 build:

* 'eclipse:clean' and 'eclipse:eclipse' works fine two.
* 'site' is correctly build but only the xdocs part, it still missing all the stuff that jelly did in maven 1.
* 'test' are failing, so are to disable to allow 'package' task to succeed.
* 'package' and 'install' works pretty fine too.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5494 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 17:59:08 +00:00
Romain Pelisse
663d87db09 Applied patch from : 1751053 - New XSL a la Checkstyle/Maven.
I removed a couple of System.out that i had forgotten about. 
I also tried to integrate this new Render into the PMDAntTask.

AntTask will now recognize this formatter:

<formatter      type="betterhtml" .../>

However, it failed very weirdly :

build.xml:81: Can't file XSLT sheet :etc/pmd-nicerhtml.xsl

Which is kind of weird as i use getClass().getResourceAsStream() to find the xsl, which is in the jar:

$ unzip -t pmd-4.0.jar | grep -e 'etc/pmd-n'
    testing: etc/pmd-nicerhtml.xsl    OK

I believe it is a classloarder problem, but i maybe wrong. I'll try to deceipher this later...


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5493 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 17:50:45 +00:00
Romain Pelisse
59f4215435 Allowing use of several directory for CPD (command line only for the moment)
For example, this is possible:

$ java net.sourceforge.pmd.cpd.CPD --minimum-tokens 10 --files rep1 --files rep2 --language fortran 

This is has been done to allow "scholar use" of PMD ( to check if one student's project in rep1 has 
many common sources with an other student project in rep2).

Commit 2/2

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5492 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 17:06:46 +00:00
Romain Pelisse
a4afbacf17 Allowing use of several directory for CPD (command line only for the moment)
For example, this is possible:

$ java net.sourceforge.pmd.cpd.CPD --minimum-tokens 10 --files rep1 --files rep2 --language fortran 

This is has been done to allow "scholar use" of PMD ( to check if one student's project in rep1 has 
many common sources with an other student project in rep2).

Commit 1/2 ( waiting for xdocs and changelog update).

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5491 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 16:52:12 +00:00
Romain Pelisse
092595ec3e Applied patch from : 1751053 - New XSL a la Checkstyle/Maven.
Added an XSLTRenderer which inherits from XMLRenderer. 
Once the XMLRenderer has done his job, the XML result will be transformed using the patch's XSTL.
It possible to use this renderer with other stylesheet, but not from the command line nor ant.

This new formatter does NOT override the old HTML renderer, to use this new one, we have to specify, 
in command line, the "betterhtml" renderer:

To quicly test it on PMD itself:
$java net.sourceforge.pmd.PMD src betterhtml rulesets/unusedcode.xml          
 
As i had to write a new renderer, i don't feel we should remove the old one for the moment.

(as always, i forgot the changelog)
Also, note that this note work with Ant, i'm working on it...


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5490 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 16:15:08 +00:00
Romain Pelisse
e12e72f006 Applied patch from : 1751053 - New XSL a la Checkstyle/Maven.
Added an XSLTRenderer which inherits from XMLRenderer. 
Once the XMLRenderer has done his job, the XML result will be transformed using the patch's XSTL.
It possible to use this renderer with other stylesheet, but not from the command line nor ant.

This new formatter does NOT override the old HTML renderer, to use this new one, we have to specify, 
in command line, the "betterhtml" renderer:

To quicly test it on PMD itself:
$java net.sourceforge.pmd.PMD src betterhtml rulesets/unusedcode.xml          
 
As i had to write a new renderer, i don't feel we should remove the old one for the moment.

Commit 2/2

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5489 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 13:50:04 +00:00
Romain Pelisse
26d1efc737 Applied patch from : 1751053 - New XSL a la Checkstyle/Maven.
Added an XSLTRenderer which inherits from XMLRenderer. 
Once the XMLRenderer has done his job, the XML result will be transformed using the patch's XSTL.
It possible to use this renderer with other stylesheet, but not from the command line nor ant.

This new formatter does NOT override the old HTML renderer, to use this new one, we have to specify, 
in command line, the "betterhtml" renderer:

To quicly test it on PMD itself:
$java net.sourceforge.pmd.PMD src betterhtml rulesets/unusedcode.xml          
 
As i had to write a new renderer, i don't feel we should remove the old one for the moment.

Commit 1/2

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5488 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-30 13:44:15 +00:00
Allan Caplan
6aa11d9ae4 First changes moving PMD to Type Resolution
- Moved all JUnit tests to Type Resolution
- All JUnit java rules extend AbstractJUnitRule, which  now has a common method to determine if this is really a test class or not. This will save needless processing, should reduce runtime as well (did not test runtime specifically)

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5487 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-29 14:26:55 +00:00
Allan Caplan
388ebfd188 First changes moving PMD to Type Resolution
- Moved all JUnit tests to Type Resolution
- All JUnit java rules extend AbstractJUnitRule, which  now has a common method to determine if this is really a test class or not. This will save needless processing, should reduce runtime as well (did not test runtime specifically)

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5486 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-28 21:12:33 +00:00
Allan Caplan
acb3c35b3b First changes moving PMD to Type Resolution
- Moved all JUnit tests to Type Resolution
- All JUnit java rules extend AbstractJUnitRule, which  now has a common method to determine if this is really a test class or not. This will save needless processing, should reduce runtime as well (did not test runtime specifically)

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5485 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-28 21:11:26 +00:00
Allan Caplan
3bbc6575ef First changes moving PMD to Type Resolution
- Moved all JUnit tests to Type Resolution
- All JUnit java rules extend AbstractJUnitRule, which  now has a common method to determine if this is really a test class or not. This will save needless processing, should reduce runtime as well (did not test runtime specifically)



git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5484 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-28 21:01:03 +00:00
Romain Pelisse
a8f04ec309 Fixing unit test build as agreed on the forum:
* Adding junit-4.1.jar to the lib/ directory
* Adding <inlcude name...> in the build.xml

$ ant -f bin/build.xml 
... should now works fine for everybody !

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5483 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-27 15:17:02 +00:00
Romain Pelisse
941d501337 Fixing unit test build as agreed on the forum:
* Adding junit-4.1.jar to the lib/ directory
* Adding <inlcude name...> in the build.xml

$ ant -f bin/build.xml 
... should now works fine for everybody !

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5482 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-27 15:13:56 +00:00
Romain Pelisse
d68927f36a Adding 'multiple lines span string support' to AbstractTokenizer, so that now String on multiples lines are considered only one token.
While doing so ... :

* Minors refactors.
* Adding two Unit Test for Ruby and Fortran tokenizer.
* Starting to doing some tuning on both tokenizer to ensure more relevant result.

I run the test without any NEW errors, but, please check if you can ;) !

(PS: forget to add this to changelog as it should, given the fact that it may change CPD's result on Ruby files).

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5481 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-24 17:09:40 +00:00
Tom Copeland
8158fbde14 Rebuilt the Java parser from the latest JavaCC CVS; this means genericized JJTreeParserState and use of StringBuilder vs StringBuffer
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5480 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-24 13:48:07 +00:00
Wouter Zelle
6565fdd28e Fixed bug 1702782 - false positive in UselessOperationOnImmutable when an Immutable on which an operation is performed is compareTo'd
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5479 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-24 11:39:02 +00:00
Wouter Zelle
52c096ca44 Fixed bug 1740480 - false positive in ImmutableField
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5478 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-23 11:13:26 +00:00
Wouter Zelle
f7b9e7cd39 Fixed build by excluding Abstract classes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5477 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-23 07:49:44 +00:00
Romain Pelisse
395b55981a Adding 'multiple lines span string support' to AbstractTokenizer, so that now String on multiples lines are considered only one token.
While doing so ... :

* Minors refactors.
* Adding two Unit Test for Ruby and Fortran tokenizer.
* Starting to doing some tuning on both tokenizer to ensure more relevant result.

I run the test without any NEW errors, but, please check if you can ;) !

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5476 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-22 16:22:29 +00:00
Allan Caplan
03fd49f71e First changes moving PMD to Type Resolution
- All string checks for String / StringBuffer have been replaced with Type Resolution friendly checks

- New helper class to centralize this check

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5475 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 14:45:11 +00:00
Romain Pelisse
487f34e33e Minor tweaks ( removing not-UTF8 characters )
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5474 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 14:31:49 +00:00
Tom Copeland
6329013f4a Minor tweaks
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5473 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 13:47:39 +00:00
Tom Copeland
2279b4c48f Minor tweaks
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5472 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 13:45:26 +00:00
Allan Caplan
7d0b8e8487 First changes moving PMD to Type Resolution
- All string checks for String / StringBuffer have been replaced with Type Resolution friendly checks

- New helper class to centralize this check

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5471 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 12:38:19 +00:00
Allan Caplan
2413f78fbe First changes moving PMD to Type Resolution
- All string checks for String / StringBuffer have been replaced with Type Resolution friendly checks

- New helper class to centralize this check

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5470 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 12:37:59 +00:00
Allan Caplan
f0acb0aea6 First changes moving PMD to Type Resolution
- All string checks for String / StringBuffer have been replaced with Type Resolution friendly checks

- New helper class to centralize this check

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5469 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-21 12:35:52 +00:00
Romain Pelisse
5451cc7ae8 As discuss in a forum topic, i added a short roadmap to the 'future directions' page.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5468 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-20 16:29:22 +00:00
Romain Pelisse
e2288aa377 See patch 1739845.
'AtLeastOneConstructor' rule will not be triggered anymore by static class (that should not have a constructor) or by utility classes ( class with only static methods ) 

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5467 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-20 14:53:09 +00:00
Romain Pelisse
7aa20acc80 Adding documentation for mvn-plugin usage, plus some documentation to increase ant memory.
(PS: first commit) 


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5466 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-20 12:37:07 +00:00
Wouter Zelle
4ad40b734e renamed helper class to be clearer
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5465 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-15 18:12:14 +00:00
Wouter Zelle
00e437b06d moved test class to xml dir
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5464 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-15 18:04:42 +00:00
Allan Caplan
94ac956d77 git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5463 51baf565-9d33-0410-a72c-fc3788e3496d 2007-08-13 14:55:59 +00:00
Torsten Kleiber
89f2a600d1 Plugin Version 1.9:
Upgraded to PMD 4.0
Upgraded for use in JDeveloper 10.1.3 to 11.1.1

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5452 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-09 16:42:38 +00:00
Torsten Kleiber
7e34fe20e2 Plugin Version 1.9: Updated PMD version to 4.0.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5451 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-09 16:39:34 +00:00
Torsten Kleiber
5c940ce31c Plugin Version 1.9: Updated PMD version to 4.0.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5450 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-09 16:38:41 +00:00
Allan Caplan
cfff538042 Adding TypeResolution to the XPath engine. This includes a new function called typeof which determines if a node (ClassOrInterfaceType only right now) is of the type. it also scans the type's heirarchy, so if you extend a class it will know.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5449 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-09 14:21:16 +00:00
Wouter Zelle
3ce3ec7f1e Fixed bug 1765613 - fixed NullPointerException in CloneMethodMustImplementCloneable when checking enum
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5448 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-06 08:42:53 +00:00
Tom Copeland
1537710808 Added Romain Pelisse; welcome aboard Romain!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5447 51baf565-9d33-0410-a72c-fc3788e3496d
2007-08-04 00:57:13 +00:00