4094 Commits

Author SHA1 Message Date
Tom Copeland
c6a1259a25 Fixed bug 1448123 - AvoidFieldNameMatchingTypeName no longer errors out on enumerations.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4293 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-13 21:42:50 +00:00
Tom Copeland
6156ba5de5 Applied a patch from Wouter Zelle to clean up the Ant Formatter class, fix a TextRenderer bug, and make toConsole cleaner.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4292 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-13 21:33:07 +00:00
Tom Copeland
20826f3fe9 Xavier Le Vourch's new SimplifyBooleanAssertion rule, thanks Xavier!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4291 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-13 13:51:57 +00:00
Tom Copeland
1ce2607fe2 1012 on linux, also
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4290 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-10 14:39:27 +00:00
Tom Copeland
65fa2711e5 Minor cleanups
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4289 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-10 14:31:42 +00:00
Tom Copeland
457c61e0d3 rls preps
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4288 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-10 14:13:32 +00:00
Tom Copeland
a9449fdb16 rls preps
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4287 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-10 14:13:31 +00:00
Tom Copeland
05bfe4338b Removed leftover Token declaration
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4286 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-09 14:58:40 +00:00
Tom Copeland
04ab35e4ab Fixed bug 1445765 - PMD no longer uses huge amounts of memory. However, you need to use RuleViolation.getBeginLine(); RuleViolation.getNode() is no more.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4285 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-09 14:56:34 +00:00
Tom Copeland
da28fac4f9 Added Will Sargent's implementation of AvoidThreadGroup
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4284 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-08 20:00:35 +00:00
Jiger Patel
3e01ec0f64 Updated jdk requirement to jdk 1.4
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4283 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-08 19:09:53 +00:00
Tom Copeland
c0e332c569 Fixed bug 1445231 - TestClassWithoutTestCases: no longer flags abstract classes.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4282 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-08 15:33:58 +00:00
Tom Copeland
871b72e010 Fixed bug 1444654 - migrating_to_14 and migrating_to_15 no longer refer to rule tests.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4281 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-07 14:14:13 +00:00
Tom Copeland
b0cc6bcefd Forgot to add a changelog entry for that one
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4280 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-06 21:54:10 +00:00
Tom Copeland
132b2ba009 Poking around at the 'CompilationUnit not visited for JSP pages' problem
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4279 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-06 02:16:47 +00:00
Tom Copeland
bad0355efa Poking around at the 'CompilationUnit not visited for JSP pages' problem
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4278 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-06 02:13:11 +00:00
Tom Copeland
85b4fe876d Updated to JUnit 3.8.2
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4277 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-05 03:30:01 +00:00
Tom Copeland
e588b6f905 Fixed bug in CallSuperInConstructor; it no longer flag classes without extends clauses.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4276 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-03 21:26:21 +00:00
Tom Copeland
204bebdbec Fixed bug 1339470 - PMD no longer fails to parse certain non-static initializers.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4275 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-03 04:18:39 +00:00
Tom Copeland
3993aaae18 oops, fixed typo
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4274 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-03 04:04:52 +00:00
Tom Copeland
cccd098ecb Added Pieter's JSP documentation, thanks Pieter!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4273 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-03 02:20:21 +00:00
Allan Caplan
ebd18cd305 1441539 False +: ConsecutiveLiteralAppends
The rule was firing if there were any append/subtraction code in a sub-method called inside append method.

Fix is to check for how many methods there are above the additive expression - if more than 1 than we're in a sub method


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4272 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-03 01:26:29 +00:00
Tom Copeland
0510ecfeae Fixed bug 1435751 - Added encoding type of UTF-8 to the CPD XML file.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4271 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-02 02:32:50 +00:00
Tom Copeland
eb79f11101 added short names for basic-jsp (jsp) and basic-jsf (jsf), modified several tests to use those
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4270 51baf565-9d33-0410-a72c-fc3788e3496d
2006-03-01 23:06:07 +00:00
Tom Copeland
74162a9857 Added schema ref to ruleset examples
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4269 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-27 14:32:13 +00:00
Tom Copeland
5cb6237b68 Fixed 'new in 3.5' link, thanks to Chris Erskine for the good catch!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4268 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-27 14:16:52 +00:00
Allan Caplan
8b8f7a1bdf Rule IframeMissingSrcAttribute check was case sensitive
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4267 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-26 15:07:24 +00:00
Allan Caplan
f9be47c09c Adding 2 JSP rules
- IframeMissingSrcAttribute tests for IFRAMEs which are missing the SRC attribute. IE will display an annoying popup if you access a page which has an IFRAME without a src element over SSL.

- NoHtmlComments finds all HTML comments. These comments are useless in a production environment. If a comment is required, consider changing to a JSP comment.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4266 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-26 02:05:50 +00:00
Allan Caplan
b0b6b3fc26 New Rule: InsufficientStringbufferDeclaration
See: http://sourceforge.net/forum/forum.php?thread_id=1438119&forum_id=188194

Rule finds StringBuffers which may be incorrectly pre-sized. It takes a worst case scenario from any if/switch blocks, and adds the lengths of all string/primative literals that are appended into the StringBuffer. It compares this against the length the constructor was given, if any. Default for a StringBuffer is 16 characters, and a buffer allocated with a String gets that String's length+16 characters.

If the constructor is created in a way that the length can not be calculated, the buffer is skipped, assuming the developer knew what they were doing.

The savings here is needless re-sizing.  If the string buffer is improperly sized, when your appends pass the current length, if forces new memory to be allocated in order to resize the buffer.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4265 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-25 02:17:10 +00:00
Tom Copeland
6233fd050e Tweaked changelog
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4264 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-25 01:15:09 +00:00
Allan Caplan
0f6fbf8404 New Rule: UnsynchronizedStaticDateFormatter
Rule checks for static (Simple)DateFormatter instances which are accessed from outside synchronized blocks.

Doing so in a multithreaded environment can have negative side effects when both threads access the object at the same time


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4263 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-25 01:04:11 +00:00
Tom Copeland
5e19ba8c9a PositionLiteralsFirstInComparisons was improved and rewritten in XPath; thanks to Wouter Zelle for the code!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4262 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-24 23:09:30 +00:00
Tom Copeland
c845045594 Uploaded ruleset schema to http://pmd.sf.net/ruleset_xml_schema.xsd
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4261 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-24 23:02:05 +00:00
Tom Copeland
ae5cdb42f3 Uploaded ruleset schema to http://pmd.sf.net/ruleset_xml_schema.xsd
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4260 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-24 22:44:37 +00:00
Tom Copeland
4d1ab2f0f3 Added ASTLiteral.isStringLiteral()
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4259 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-24 14:20:52 +00:00
Tom Copeland
61fb190df1 Fixed bug 1413745 - ArrayIsStoredDirectly no longer reports false positives for array deferences.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4258 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-23 15:34:06 +00:00
Tom Copeland
075fca024c Fixed bug 1435218 - LoggerIsNotStaticFinal no longer reports false positives for local variables.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4257 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-23 14:59:32 +00:00
Tom Copeland
7da38a2573 Oops, only parseStress() was using new option, fixed
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4256 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-21 23:03:01 +00:00
Tom Copeland
db8e4f9495 Added a getVersionString method to the TargetJDKVersion interface; added a '--targetjdk 1.5' optional parameter to Benchmark
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4255 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-21 22:58:19 +00:00
Tom Copeland
49165e5875 Added more XSLT from Dave Corley - you can use them to filter PMD reports by priority level.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4254 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-21 14:50:31 +00:00
Tom Copeland
5b77b37cea Fixed bug 1433439 - UseIndexOfChar no longer reports false positives on case like indexOf('a' + getFoo()).
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4249 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-18 19:23:00 +00:00
Tom Copeland
e9f7bbe3a6 Rewrote AvoidCallingFinalize in Java; fixed bug and runs much faster, too.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4248 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-17 14:12:32 +00:00
Tom Copeland
e9851ccd64 Fixed release packaging; now entire xslt/ directory contents are included. Thanks to Dave Corley for the report
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4247 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-17 04:20:14 +00:00
Tom Copeland
2af877a912 More committer migrations
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4246 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 23:18:21 +00:00
Tom Copeland
1385ad546a Shifted Colin to 'committers emeritus'
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4245 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 14:45:51 +00:00
Tom Copeland
5a1d7de92c fiddle
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4244 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 14:25:20 +00:00
Tom Copeland
cb6e8db179 Adding Johan to committers list!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4243 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 14:19:05 +00:00
Jiger Patel
15c1affaa6 Removed since not used in PMD 3.5 and hence.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4242 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 07:20:15 +00:00
Jiger Patel
447cc3c39a New libraries as required by PMD 3.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4241 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 07:18:27 +00:00
Jiger Patel
b324020c0d Updated to PMD 3.5 and fixed API changes in 3.5
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4240 51baf565-9d33-0410-a72c-fc3788e3496d
2006-02-15 07:15:14 +00:00