IllegalToken: enabled

This commit is contained in:
Paul Campbell 2016-09-06 20:16:51 +01:00
parent 55e103c531
commit aed8ec658c
2 changed files with 6 additions and 5 deletions

View file

@ -154,7 +154,7 @@ You need to include `checkstyle` as the version bundled with the `maven-checksty
* [IllegalImport](#illegalimport) - checkstyle - enabled
* [IllegalInstantiation](#illegalinstantiation) - checkstyle - disabled
* [IllegalThrows](#illegalthrows) - checkstyle - enabled
* [IllegalToken](#illegaltoken) - checkstyle - disabled
* [IllegalToken](#illegaltoken) - checkstyle - enabled
* [IllegalTokenText](#illegaltokentext) - checkstyle - disabled
* [IllegalType](#illegaltype) - checkstyle - enabled
* [ImportControl](#importcontrol) - checkstyle - disabled
@ -1191,6 +1191,10 @@ Invalid:
throw new RuntimeException("boom!");
````
#### [IllegalToken](http://checkstyle.sourceforge.net/config_coding.html#IllegalToken)
Checks that labels are not used.
#### [IllegalType](http://checkstyle.sourceforge.net/config_coding.html#IllegalType)
Prevents variables, parameters and method returns from being one of the following:
@ -2641,10 +2645,6 @@ Couldn't get my IDE's (IntelliJ) code style to match.
Not really suitable for a template ruleset as it requires an explicit list of classes to apply to.
#### [IllegalToken](http://checkstyle.sourceforge.net/config_coding.html#IllegalToken)
> TODO: enable
#### [IllegalTokenText](http://checkstyle.sourceforge.net/config_coding.html#IllegalTokenText)
Generic rule; doesn't embody a 'quality' check.

View file

@ -99,6 +99,7 @@
<module name="IllegalCatch"/> <!-- prevent generic catches (i.e. Exception, Throwable, RuntimeException) -->
<module name="IllegalImport"/> <!-- prevent imports from the sun.* package -->
<module name="IllegalThrows"/> <!-- prevent generic throws (i.e. Exception, Throwable, RuntimeException) -->
<module name="IllegalToken"/> <!-- prevents use of labels -->
<module name="IllegalType"/> <!-- prevents variables, returns or parameters of non-interface Collections classes -->
<module name="InnerAssignment"/> <!-- prevent assignments in subexpressions (i.e. while((line = read()){}) -->
<module name="InnerTypeLast"/> <!-- inner classes appear after methods and fields -->