Commit Graph

513 Commits

Author SHA1 Message Date
Lars Kühne f1ef403f5e Added SimplifyBooleanExpressionCheck to find code like "if (b == true)".
Also fixed SimplyfyBooleanReturnCheck and introduced tests.
2002-10-21 07:20:19 +00:00
Lars Kühne 54b9235aed also added offending import in avoidStar message 2002-10-21 05:54:38 +00:00
Lars Kühne 768664d654 incorporated patch 626058 from Ville Skytte, Output duplicate/redundant import names 2002-10-21 05:19:15 +00:00
Lars Kühne 404fcfba9c removed line legth checks from old codebase 2002-10-19 13:30:45 +00:00
Lars Kühne 1050efd1ce ported LineLengthCheck 2002-10-19 13:19:41 +00:00
Oliver Burn 84eddc3673 Added a new class TokenTypes that contains all the type constants. This class
breaks the circular dependencies - the cost is needing to maintain this class
when a new grammar is introduced.
2002-10-19 06:28:06 +00:00
Oliver Burn 3f14872d33 Added a target to run the gui 2002-10-19 06:26:09 +00:00
Oliver Burn 94facbbd4d Changed to now display the Token Type as a name 2002-10-19 06:25:45 +00:00
Lars Kühne 5635ac93dc fixed typo in comment 2002-10-18 05:42:46 +00:00
Lars Kühne 7f35e143a2 cleanup of checkstyle errors 2002-10-17 22:52:25 +00:00
Lars Kühne 19708f9811 Added MethodLengthCheck + test
Added some helpers to DetailAST to simplify the implementation of the MethodLengthCheck
2002-10-17 22:08:54 +00:00
Lars Kühne d91c5c64f5 Forgot to commit visibility changes required for the parsing hack in the new
gui to work.

This change should be reverted once we have a central place for parsing.
Each change is marked with a TODO comment.
2002-10-17 20:13:18 +00:00
Lars Kühne c3e5b68479 removed old visibility modifier checks 2002-10-17 20:10:18 +00:00
Lars Kühne d3433c91e0 Added initial GUI.
Oliver, please check that the file headers do not
lead to license problems with Sun - maybe we need to remove
our own header and exclude the gui package from the run.checkstyle
target?
2002-10-17 00:13:04 +00:00
Lars Kühne 220f6cb5d9 ported member visibility checks 2002-10-17 00:07:42 +00:00
Lars Kühne d144d69181 clear childCount cache when branch is thrown away 2002-10-17 00:04:58 +00:00
Oliver Burn dd1421cc88 Removed the old parameter number check. 2002-10-14 23:45:33 +00:00
Oliver Burn 696e7f063f Implemented the parameter number check.
Also fixed more Javadoc.
2002-10-14 23:36:11 +00:00
Oliver Burn 253994d210 Changed so that todo checking is off by default 2002-10-14 11:55:53 +00:00
Oliver Burn 63664e0b01 An attempt to get the Checkstyle error count reduced. Please help....... 2002-10-13 23:41:00 +00:00
Oliver Burn 98f0c51ab0 Moved PadOption 2002-10-13 14:18:18 +00:00
Oliver Burn a0411608c3 Removed the old paren pad check 2002-10-13 14:15:31 +00:00
Oliver Burn aede54ee77 Fully implemented the paren pad check 2002-10-13 14:05:42 +00:00
Oliver Burn 5fd3fab179 Stopped the tokens LPAREN and RPAREN being silently eaten by the grammar. Now
need to implement the ParenPad check. Should be easy.

Also need to refactor some the existing tests to use utility methods for
locating tokens in the tree. Currently hard code the positions, which is not
ideal.
2002-10-13 13:31:42 +00:00
Oliver Burn 5e1da0a269 Moved location of LeftCurlyOption 2002-10-13 12:53:21 +00:00
Oliver Burn 8083866f72 Removed unused options. 2002-10-13 12:46:33 +00:00
Oliver Burn 1bba9f0056 removed old implementation of Other Left Curly Check 2002-10-13 12:36:02 +00:00
Oliver Burn 21c76786c6 Implemented Other Left Curly check 2002-10-13 12:08:58 +00:00
Oliver Burn e9faeb047f Added the LCURLY for switch statements 2002-10-13 11:21:47 +00:00
Oliver Burn 2cca9c57c9 implemented the method left brace check 2002-10-13 11:15:29 +00:00
Oliver Burn 2213adc2bc Pulled up common functionality 2002-10-13 10:52:03 +00:00
Oliver Burn 57d8e4b099 Implement left curly check for type definitions. Now about to implement for
methods to refactor the common code.
2002-10-13 10:42:15 +00:00
Oliver Burn 4927e940af fixed imports 2002-10-13 04:28:09 +00:00
Oliver Burn b1cfd257eb Major refactor to implement the RightCurly check. Required the ANTLR grammar
to be worked to:

- Not silently eat tokens (more to be done)

- Not get the token tree out of order for try/finally
2002-10-07 09:17:16 +00:00
Oliver Burn 51941dcf24 added TreeViewer to help with development. 2002-10-06 23:52:34 +00:00
Lars Kühne 7a603d5fa8 finally managed to tell beanutils what I want, checks now have their 'natural' api 2002-10-06 13:21:27 +00:00
Lars Kühne e20d45697c finally managed to tell beanutils what I want, checks now have their 'natural' api 2002-10-06 13:14:16 +00:00
Lars Kühne 1efd41aa92 cleanup after port of illegal instantiations 2002-10-01 21:07:42 +00:00
Oliver Burn eb7b7bfd3e Major refactoring to support correct column numbers. Also removed all the old
code for whitespace checking around things. This required fixing the grammar
to not consume COLON tokens. Looks like you are onto something Lars with your
previous email (made it easy to find the bug).
2002-10-01 08:47:26 +00:00
Lars Kühne 81dab0c141 included the new patterns suggested by Vijay R. Aravamudhan 2002-10-01 05:14:05 +00:00
Lars Kühne ce175a83d8 ported the illegal instantiations check
still need to remove the old code
2002-09-29 19:43:38 +00:00
Lars Kühne 65d3c9814b removed unused private methods 2002-09-29 14:46:36 +00:00
Lars Kühne 6d191d438b completed port of modifier order check, removed old code 2002-09-29 14:28:10 +00:00
Lars Kühne 553a1aec9f removed redundant modifier checks from old code 2002-09-29 14:16:38 +00:00
Lars Kühne 021d6344b6 ups..., removing local test code 2002-09-29 14:08:13 +00:00
Lars Kühne d7c1da9a93 removed tab check and file length check from old code 2002-09-29 14:04:36 +00:00
Lars Kühne f7b0ed0a76 added test for tab character check 2002-09-29 13:46:35 +00:00
Lars Kühne a7c5f33141 Added test for FileLengthCheck 2002-09-29 12:58:27 +00:00
Lars Kühne 031bc6f277 fixed style problem (package visible member) 2002-09-29 09:37:10 +00:00
Oliver Burn 18d65a1993 Moved across all the import checks 2002-09-29 05:55:02 +00:00