Commit Graph

146 Commits

Author SHA1 Message Date
Oliver Burn 552b917ddb Support column numbers for ()'s. 2002-04-25 08:06:07 +00:00
Oliver Burn 1edf43ab32 Support column numbers for {}'s. 2002-04-25 07:50:34 +00:00
Oliver Burn 4d0adc9dee Support column numbers for method names. 2002-04-25 07:18:12 +00:00
Oliver Burn 6970485b88 Started to add support for including the column number in the output. It
really rocks - I wish I had done it from the start!

Strangely, although I am starting to use IDEA a lot for code development, I
still use Emacs for fixing checkstyle errors.
2002-04-25 07:03:40 +00:00
Oliver Burn 2279ec2a48 Removed a hack of using toString() on AuditEvent in the default logger. 2002-04-25 05:30:37 +00:00
Oliver Burn 3ded17ac3d Changed support for parenthesises padding to take an option, rather that being
a boolean of whether to ignore or not. This will allow the adding of more
styles in the future. Good idea Lars! :-)
2002-04-24 14:36:27 +00:00
Oliver Burn cbb5f228d8 Removed unused code. 2002-04-24 14:33:47 +00:00
Oliver Burn 083a7d432a Added option to disable checking for padding of parenthesis. As asked for by
Lars. Eventually should have an option to allow different styles - rather the
current "Sun way" or the "highway.
2002-04-22 10:41:10 +00:00
Oliver Burn 6b016753d1 Fixed a copy & paste error. 2002-04-22 09:51:01 +00:00
Oliver Burn f1dc5b5778 Trying to get into the recommended style from Sun. 2002-04-22 09:02:22 +00:00
Lars Kühne 91a4d48af7 fix for bug 540384, multiple throws tags for the same exception should be OK 2002-04-22 05:23:50 +00:00
Lars Kühne 206ff56be6 added test for rfe 537107, "public" in interface method
moved test input for "order of modifiers" to InputModifiers
to keep InputSimple simple
2002-04-21 21:06:42 +00:00
Lars Kühne caf539ded2 Implementation + docs for rfe 537107, "public" in interface methods 2002-04-21 21:02:57 +00:00
Oliver Burn e200d9bf3d 545128: implemented "-r" recursive option and improved the argument handling 2002-04-17 11:59:52 +00:00
Oliver Burn a1de100581 Reworked the logic to give a better error reporting. 2002-04-17 11:57:32 +00:00
Oliver Burn 44950d1ee4 Fixed #544985 to handle Javadoc on variable declarations that span several lines 2002-04-17 11:56:24 +00:00
Lars Kühne 1b8483fc82 execute Checker.destroy() at the end of each test 2002-04-17 05:12:24 +00:00
Lars Kühne d6785794bf added trailing whitespace to enhance code coverage for Util.lengthMinusTrailingWhitespace() 2002-04-17 04:58:48 +00:00
Lars Kühne a9f84b3767 execute Scope.getInstance() to enhance code coverage 2002-04-17 04:52:55 +00:00
Lars Kühne e3588963d0 fixed typo in comment 2002-04-17 04:50:52 +00:00
Lars Kühne 00447a8fe3 added check for illegal imports 2002-04-17 04:43:55 +00:00
Lars Kühne d3aa5da76d added test for regexp-disabling of line-length checks 2002-04-13 08:33:41 +00:00
Lars Kühne 62e2b65b9e Implementation for RFE #524650, regexp-disable line-length checking 2002-04-13 08:30:01 +00:00
Oliver Burn ed3e6a2428 Fixed bug where static variable checks were not taking into account the flags
to allow protected and package levels.
2002-04-12 12:23:14 +00:00
Oliver Burn 49314771b6 Fixed bug that allowed constant declarations to contain "__". 2002-04-07 09:16:43 +00:00
Oliver Burn da5d8c09d2 Fixed checkstyle errors. 2002-04-04 13:48:48 +00:00
Oliver Burn 46f7cfd92a Updated for new checks for whitespace around ()'s. 2002-04-04 13:46:44 +00:00
Oliver Burn 2b8786f133 Added checking for whitespace around ()'s. Currently checks for the format
of blah(p1, p2) and complains over blah( p1, p2 ).
2002-04-04 13:46:07 +00:00
Lars Kühne 0e0ca2bddf added failureProperty to ant task (RFE 534038) 2002-03-23 17:03:15 +00:00
Lars Kühne 190c0e5ca6 Fixed bug introduced during cleanup of duplicate code:
Reader cannot be reused by fallback lexer, it would
never see the characters that have been consumed before
the RecognitionException in the first parsing attempt.

Also added comment why the JDK 1.4 grammar is tried first.
2002-03-19 20:26:02 +00:00
Lars Kühne 08c03a7a57 added test for grammar fallback in Checker (assert as identifier) 2002-03-19 20:19:51 +00:00
Lars Kühne dd476d3368 fix for bug 528358, was introduced in revision 1.17 2002-03-19 19:35:09 +00:00
Lars Kühne 2a7c9dd831 added whitespace checks to assert statement 2002-03-19 06:16:22 +00:00
Oliver Burn b671e6bb1c Removed some duplicate code, as I also feel the pain. I like the patch, but
I question using the Java14 lexer/recognizer first. Is this because most of
the time it will succeed (especially with 1.4 source:-). Be great if a
comment could be added to the code.
2002-03-14 10:20:46 +00:00
Lars Kühne e2ec464f27 added support for jdk 1.4 assert statements
grammar changes inspired by John Pybus on the antlr-interest mailing list,
see http://groups.yahoo.com/group/antlr-interest/message/4968

the changes to Checker.java are not very clean, but I don't see a better
solution unless the ANTLR api is improved (compilationUnit() should be an
abstract member of Parser, error reporting should be pluggable)
2002-03-14 06:19:09 +00:00
Lars Kühne 6b51ac1580 added tests for Configuration serialization 2002-03-06 06:08:00 +00:00
Lars Kühne ec1e3e8349 fix for bug #522282, "Cache not invalidated upon param. change"
- all classes that contribute to Configuration are now Serializable
- use in-memory serialization to compute a hashcode of the Configuration
- store the hashcode in the cache file
- compare cached hashcode with current hashcode and invalidate cache accordingly
2002-03-05 20:53:04 +00:00
Oliver Burn 1a596b6827 Renamed anttasks.properties to checkstyletask.properties. A much clearer name. 2002-02-25 12:15:07 +00:00
Oliver Burn 47383398f8 Implemented checking for right curly checking '}'. This was much easier that
for the left. Just need to do the documentation now.
2002-02-23 06:16:55 +00:00
Lars Kühne d3af93d07b explicitly set tab width to 1 column
fixes RFE #520410 (support latest ANTLR versions)
2002-02-23 00:37:53 +00:00
Oliver Burn 07a9baacf9 Remove a global variable hack. 2002-02-22 04:21:14 +00:00
Oliver Burn 59ce3f31d7 Added support for brace checking on the keywords try, catch, finally, static.
What are not covered deliberately are labels and instance initializers.
2002-02-22 04:12:04 +00:00
Oliver Burn 41e2089574 Added support for - for, do, else, synchronized 2002-02-22 03:37:41 +00:00
Oliver Burn f4860ef3b4 Implemented brace checking for "if" and "while" 2002-02-22 03:11:36 +00:00
Oliver Burn 9943aefac7 Added support for setting the brace option for others + new tests. Now
check location of '{' on switch statements.
2002-02-21 23:37:59 +00:00
Oliver Burn fd24216f46 Now have '{' checking for methods and types. Also put in place the logic to
be able to check the others.
2002-02-21 22:43:55 +00:00
Oliver Burn c85ec6f26a Merged the Streamable interface into the AuditListener interface. Having them
separate served no real purpose at the moment, except to complicate the
implementation.
2002-02-20 23:19:08 +00:00
Oliver Burn 339a7f5475 Fixed a checkstyle error 2002-02-20 23:09:01 +00:00
Oliver Burn e10faf3315 First cut at doing left curly checking for methods. This is definitely a work
in progress that will change a lot as I add checking for other constructs. I
always tend to evolve to the general solution. :-)
2002-02-20 23:08:21 +00:00
Oliver Burn 1fd18cde7b Now support setting the left curly placement option for methods. I am
implementing this example first, before doing it for types, statics, arrays,
anon inners, etc.
2002-02-20 02:52:27 +00:00