Commit Graph

678 Commits

Author SHA1 Message Date
Oliver Burn ee68e92168 Convert over the easy tests to JUnit 4.x 2008-01-15 10:55:13 +00:00
Oliver Burn fbfe160ca8 Upgrade to require ANT 1.7.0 and use JUnit 4.4. A nice by product is that JUnit is no longer required to be in the ANT classpath.
Requiring ANT 1.7.0 should not be a drama as it was released over one year ago. It is required to run JUnit 4.x tests (without a hack workaround being required).
2008-01-15 10:20:32 +00:00
Oliver Burn feb4348470 Retired the J2EE checks and also the optional bundle. 2008-01-14 05:13:24 +00:00
Oliver Burn 0a4a41f479 Fixed bug 1860424, incorrectly flagging an import as being unused. 2008-01-13 01:35:44 +00:00
Lars Kühne 748c0102a0 moved testinputs for import checks to imports package 2007-12-22 19:25:53 +00:00
Oliver Burn 7065b0d9dc Another point of no return - remove fall back parsing to Java 1.3 syntax. 2007-12-20 06:43:52 +00:00
Oliver Burn f38d8abd42 Removed a native array in favour of a List<File> -- was it worth it??
Added @Override where possible -- did this as I got bitten by a subtle bug when making the first change. The @Override would have prevented it.
2007-12-20 06:21:11 +00:00
Oliver Burn a168a3f583 Add documentation for JavadocPackage check and "retire" the PackageHtml check. 2007-12-19 05:19:37 +00:00
Oliver Burn 49216b21a1 100% code coverage achieved. Not common. :-) 2007-12-19 04:46:24 +00:00
Oliver Burn 3b3672d469 Added more edge cases found when running over the Java SDK 6.0 source code. 2007-12-18 02:31:27 +00:00
Oliver Burn 1fe8bcab1a Added another edge case. 2007-12-17 12:02:07 +00:00
Oliver Burn 325b265cc5 Fix an edge case. 2007-12-17 03:12:45 +00:00
Oliver Burn ac596b1c3a Implementation of a check to ensure "correct" whitespace around the Generic statements. A long overdue check. 2007-12-16 03:59:43 +00:00
Oliver Burn a479aa7e53 Remove '<?>' characters from the whitespace around check as this is wrong. Causes much grief. 2007-12-16 00:04:41 +00:00
Oliver Burn f1afaf83f3 Finish of adding generics. 2007-12-15 08:14:40 +00:00
Oliver Burn c18071b756 repeat changes made in CVS. 2007-12-13 23:31:00 +00:00
Oliver Burn a92d4a5f1b Fix problems due to import process 2007-12-11 00:39:39 +00:00
Lars Kühne 0759e22574 Fixed bug #1762702, false alarm in HideUtilityClassConstructor check when class has only static methods but contains non static fields 2007-07-29 21:30:07 +00:00
Oliver Burn 7a6bf01c4d Add a url option for ImportControl check. Thanks to Benjamin Lerman for
the patch 1724683.
2007-06-04 04:02:05 +00:00
Lars Kühne 14d21b831c Fixed Java parser error for array brackets in wildcard generic types (bug #1394014).
Thanks to Paul Constantinides for submitting the fix (patch #1422247).
2007-03-25 20:08:00 +00:00
Lars Kühne 9d41bddb46 Fixed bug #1579227: Fixed docs, added unit tests and changed the check implementation to allow turning off the | and & operators 2007-03-20 20:29:35 +00:00
Lars Kühne 5a6be4c757 Use BigInteger in complexity metrics checks to avoid integer overflow (bug 1654769).
Thanks to Simon Harris (haruki_zaemon) for reporting this bug together with an idea how to fix it.
2007-02-12 19:13:42 +00:00
Lars Kühne a501b8d95a fix for bug 1560940: MultipleStringLiteralCheck now ignores annotations by default. It is possible to retain the old behaviour by setting the new check property ignoreOccurrenceContext to an empty value. 2007-02-11 13:37:19 +00:00
Lars Kühne feec78894c fixed test failure because of nondeterministic output in violation report 2007-01-27 14:07:36 +00:00
Oliver Burn c658410a1a removed dead code 2006-12-22 06:41:30 +00:00
Oleg Sukhodolsky 20a7915f5f Fixed gump failure.
Fixed NPE in FallThrough check (bug 1472228)
Fixed typo in Command Line example (bug 1464595)
2006-10-28 20:53:34 +00:00
Lars Kühne 6f1f7bd3fd Added CrossLanguageRegexpHeaderCheck. This involved some refactorings to avoid duplicate code, so lots of files are affected
- moved AbstractHeaderCheck to header package
- moved file extension filtering code to Utils, so it's available not only from FileSetChecks
- moved regexp header checking logic to RegexpHeaderChecker bean
- moved check initialization logic and parameter checking to HeaderInfo classes
2006-10-19 20:35:08 +00:00
Lars Kühne 9aa72722de - fix for bug #1564465 (StrictDuplicateCode misses duplications that overlap).
- don't report blocks that contain only empty lines. With the obove bugfix, that is absolutely neccesary to check the JDK, because much of the nio code is machine generated and contains large empty blocks. With all of them overlapping, the SDC would produce huge amounts of violation reports without this change
- Further speedup by using a reverse lookup from the sorted relevant checksums back to the original line index numbers
- Externalized low level checksum management to a separate class, ChecksumInfo, so SDCC contains more high level code
2006-10-03 18:33:09 +00:00
Lars Kühne a1068badba added unit test to demostrate bug #1564465 (test is disabled until the problem is fixed, so that gump won't break) 2006-09-24 11:37:55 +00:00
Oliver Burn f4a92dad02 Make member variables final where appropriate. 2006-07-07 03:33:55 +00:00
Oliver Burn 103a2068a8 Removed TYPECAST as a default token from the NoWhitespaceAfterCheck. It
can still be specified though.
2006-06-17 14:51:26 +00:00
Oliver Burn 0a72322796 Tighten up the allowed use of the {@inheritDoc} tag. 2006-05-22 13:49:16 +00:00
Oliver Burn c38185458a Code cleanup 2006-01-21 12:43:02 +00:00
Lars Kühne 832c1c426e import cleanup 2006-01-18 20:19:34 +00:00
Oliver Burn 788b41973d Changes to make it possible to identify a module by an id, and then to
suppress messages based on the id. The motivation is to allow for finer
grained suppressions. For example, can enable multiple instances of the
Regexp check, and suppress on the individual instance.
2005-12-29 12:35:00 +00:00
Oleg Sukhodolsky 96c668724b Added WriteTag check which outputs a JavaDoc tag as information (patch 902110). Thanks to Daniel Grenner (dgrenner) for contribution. 2005-12-26 07:27:59 +00:00
Oleg Sukhodolsky ea4085cd15 Fix for rfe 1248106 (TYPECAST is now accepted by NoWhitespaceAfter)
Fix for rfe 953266 (thanks to Paul Guyot (pguyot) for submitting patch)
IllegalType can be configured to accept some abstract classes which
matches to regexp of illegal type names (property legalAbstractClassNames)

TrailingComment now can be configured to accept some trailing comments
(such as NOI18N) (property legalComment, rfe 1385344).
2005-12-25 16:13:10 +00:00
Oleg Sukhodolsky 78e9ce8701 Fix for 1000092 (RightCurlyCheck misbehaves for LIT_CATCH)
Now the check verifies the placement of rcurly after all IFs, ELSEs,
CATCHes and FINALLYs.  Also it could check that rcurly starts the
line.

Also minor fix for typos in all AllTests.main(): we need to call
runner with AllTests.suite(), not with AllTests.class
2005-12-17 19:03:33 +00:00
Oleg Sukhodolsky dfbaeedf8b fix for 1379666 2005-12-15 14:38:12 +00:00
Oleg Sukhodolsky 14172dd01a Fixed 1374792. Now we do not need to look for ident before lparen, we just look at char instead. 2005-12-07 17:23:04 +00:00
Oleg Sukhodolsky 5f0f6d3929 Fix for 1371588 2005-12-02 12:17:30 +00:00
Oleg Sukhodolsky 9d8134f4e8 Applied patch 1348873 which implements rfe 1345691 2005-11-10 13:38:44 +00:00
Oliver Burn ab1e308913 Incorporate excellent patch [ 1344344 ] Consolidation of regexp checks. 2005-11-06 11:54:13 +00:00
Oleg Sukhodolsky 89ee699fae Applied patch 906531 (WhitespaceAround allows empty method/ctor bodies.) Thanks to Eric Roe 2005-11-01 15:38:32 +00:00
Oleg Sukhodolsky d46dc44e79 FallThrough check now can check last case group (property checkLastCaseGroup, bug 1245942). 2005-10-31 12:31:38 +00:00
Oleg Sukhodolsky 4c1700ebe1 Applied patches 1339523(partially) and 1340300 2005-10-28 19:04:01 +00:00
Oleg Sukhodolsky b4ad010003 Fixed 1322879 - ParenPadCheck should be aware about ou current grammar ;) 2005-10-24 16:46:57 +00:00
Lars Kühne 2554557c1c fixed bug #1195047, InnerAssignment check didn't find all instances of inner assignments 2005-10-23 07:49:43 +00:00
Lars Kühne 9c0d514694 removed obsolete import 2005-10-21 05:33:18 +00:00
Oliver Burn 253622ab83 Patch 254918 from taab. 2005-10-08 01:18:51 +00:00