Commit Graph

606 Commits

Author SHA1 Message Date
Lars Kühne 0eded9de9c removed unused throws declaration, Exception is never thrown inside method body 2002-11-07 19:03:28 +00:00
Rick Giles 3db24e2377 clarified comment for method inCodeBlock 2002-11-07 18:31:30 +00:00
Rick Giles d93f403e8f added comments 2002-11-07 18:03:08 +00:00
Rick Giles 5057b2c44f added coverage to test interfaces 2002-11-07 17:22:18 +00:00
Rick Giles d2a0e41072 fixed bug in checking an interface. 2002-11-07 17:21:41 +00:00
Rick Giles 74989ba011 Checks whether a local variable or parameter shadows a field.
This is the cause for one of the most common logic errors of beginners.
2002-11-07 10:20:55 +00:00
Oliver Burn b19d1056bb Moved the Scope class into the API package. 2002-11-06 07:26:26 +00:00
Oliver Burn 1321eda54e remove dead code 2002-11-06 07:12:58 +00:00
Oliver Burn 5fc3ff2bfb Please ensure you thoroughly test code before committing it. As a sanity test,
ensure that the target "checkstyle.checkstyle" will run! If in doubt, do not
commit, but instead said a patch to the devel mailing list for a review.

Finished the port of the ClassResolver code. Even though it compiled, it had
no chance of working due to class casting problems. They have not been
fixed. Also needed to ensure the correct class loader is being used.
2002-11-06 03:57:58 +00:00
Oliver Burn e7556f4af6 Fixed more Checkstyle errors. 2002-11-06 02:52:12 +00:00
Oliver Burn fc358e2da0 Fixed Javadoc errors 2002-11-06 00:47:21 +00:00
Oliver Burn 267bdf5417 Refactor to improve the AbstractOptionCheck code. 2002-11-06 00:40:26 +00:00
Oliver Burn 903f780d58 Added a getAbstractOption() method. I am going to change the design of this
class to improve the following:

- Not have protected member variables that are accessed directly. Checkstyle
  reports this error.

- By default the mOption member is not initialised to a default value. This is
  causing strange behaviour in the EmptyBlockCheck when no option is specified,
  as it does nothing. It should default to statement.
2002-11-06 00:23:32 +00:00
Oliver Burn c9bcfe0be0 Fixed checkstyle errors - could we all now get into the habit of running
"checkstyle.checkstyle" before committing.
2002-11-06 00:18:46 +00:00
Oliver Burn 93bba09f70 Wanting to turn on the check - but it fails. Need to resolve as it is most
likely to be a classpath issue.
2002-11-06 00:14:40 +00:00
Oliver Burn f38b8c49c4 Update to version 1.5. 2002-11-05 23:57:36 +00:00
Rick Giles 3bcc2c1391 update for JavadocMethodCheck 2002-11-05 20:39:56 +00:00
Rick Giles d75ea91dd1 cleanup for JavadocMethodCheck 2002-11-05 17:10:25 +00:00
Rick Giles c75f97dbc2 Javadoc method check 2002-11-05 13:13:14 +00:00
Rick Giles f42953e35b handle anonymous class 2002-11-05 00:37:59 +00:00
Lars Kühne dbf2a5cb49 made methods final if they are not meant to be overridden
made most methods protected, they are only called by Check implementations
removed todo comments
2002-11-04 06:10:45 +00:00
Oliver Burn 065c1d3bc5 Fixed a series of Checkstyle errors. 2002-11-03 22:13:24 +00:00
Rick Giles ad0a4e637a style cleanup, plus query about TokenTypes.LITERAL_SYNCHRONIZED 2002-11-03 18:45:01 +00:00
Rick Giles da628acc0d cleanup for EmptyBlockCheck 2002-11-03 18:37:41 +00:00
Rick Giles 6c8770ef09 refactor to use AbstractOption and AbstractOptionCheck 2002-11-03 17:47:37 +00:00
Rick Giles 982b3963ca empty block check with options 2002-11-03 17:46:03 +00:00
Lars Kühne d471c9cd54 override read(), leads to ~10 percent performance increase 2002-11-03 15:03:36 +00:00
Oliver Burn fb97056b9b Fixed bug in MethodLeftCurlyCheck where it did not handle interfaces and
abstract methods.
2002-11-03 12:06:15 +00:00
Lars Kühne bf1b83ee6f made class package local again 2002-11-03 09:53:29 +00:00
Lars Kühne 1aa2134399 fixed NPE 2002-11-03 08:37:00 +00:00
Oliver Burn 4945b82e6d Folded the constructor length test into the method length check. Seems silly
to have them as separate checks.
2002-11-03 02:37:20 +00:00
Oliver Burn ba8a851e90 Fixed bug in MethodLengthCheck where it was assuming that a method definition
had to have braces. Not the case for interfaces and abstract methods. Need to
make the same change to the other method check.
2002-11-03 02:14:07 +00:00
Oliver Burn ce177456e7 Made some style changes. 2002-11-03 01:47:12 +00:00
Oliver Burn 15c641997d Minor tweak to the style. Rather not use the local variable of the name
sListAST as it matches the format used for static member variables. Also like
to use parenthesis.
2002-11-03 01:42:36 +00:00
Lars Kühne fde1418532 include the new commons jars in checkstyle-all.jar 2002-11-02 18:20:12 +00:00
Lars Kühne a865663e99 fixed NPE 2002-11-02 17:09:46 +00:00
Lars Kühne e70cb13b07 fixed NPE 2002-11-02 16:44:52 +00:00
Lars Kühne 642d9c5035 java.g cleanup as requested by Rick, also removed empty methods 2002-11-02 15:29:59 +00:00
Rick Giles 04eaaf55e1 patch following need braces check. 2002-11-02 12:54:09 +00:00
Rick Giles da7118ff79 patch following need braces check. updated braces tests. 2002-11-02 12:53:08 +00:00
Rick Giles 61b8d9ef88 patch following need braces check. removed verify braces. 2002-11-02 12:51:54 +00:00
Rick Giles c2b58c7459 need braces check test 2002-11-02 12:49:02 +00:00
Rick Giles 1eb8cee0fb need braces check 2002-11-02 12:48:24 +00:00
Oliver Burn 3288a81e30 Just converted over the Checkstyle ANT task to use the new framework. In
process I had to fix numerous errors now being reported.

There are some bugs with the method checks, which I will now investigate.
2002-11-02 12:22:14 +00:00
Oliver Burn 90c0f0affe removed unused import. Eclipse reported it in the task list, so I needed fix
it ;-)
2002-11-02 07:27:09 +00:00
Lars Kühne a2fded8ed7 Added getAcceptableTokens to Check.
Prevent registration for tokens the Check is not
designed for
2002-11-02 06:48:52 +00:00
Oliver Burn 2effcfd0bc Start of conversion to only supporting the new framework. Also refactored
error handling.
2002-10-31 12:28:47 +00:00
Oliver Burn cd32cd1ab0 fix checkstyle errors 2002-10-31 09:59:49 +00:00
Lars Kühne c0a8e0ff6c ported Verifier.verifyDot() to NoWhiteSpaceAroundCheck 2002-10-31 06:25:59 +00:00
Lars Kühne 67ac0b2ade DropTargetAdapter is only available in JDK 1.4, using DropTargetListener instead
as this was the only place in the source tree where 1.4 was required
2002-10-31 04:58:11 +00:00