MethodTypeParameterName: enabled
This commit is contained in:
parent
0c12b97cd2
commit
779839dbde
2 changed files with 18 additions and 5 deletions
22
README.md
22
README.md
|
@ -187,7 +187,7 @@ You need to include `checkstyle` as the version bundled with the `maven-checksty
|
||||||
* [MethodLength](#methodlength) - checkstyle - enabled
|
* [MethodLength](#methodlength) - checkstyle - enabled
|
||||||
* [MethodName](#methodname) - checkstyle - enabled
|
* [MethodName](#methodname) - checkstyle - enabled
|
||||||
* [MethodParamPad](#methodparampad) - checkstyle - enabled
|
* [MethodParamPad](#methodparampad) - checkstyle - enabled
|
||||||
* [MethodTypeParameterName](#methodtypeparametername) - checkstyle - disabled
|
* [MethodTypeParameterName](#methodtypeparametername) - checkstyle - enabled
|
||||||
* [MissingCtor](#missingctor) - checkstyle - disabled
|
* [MissingCtor](#missingctor) - checkstyle - disabled
|
||||||
* [MissingDeprecated](#missingdeprecated) - checkstyle - enabled
|
* [MissingDeprecated](#missingdeprecated) - checkstyle - enabled
|
||||||
* [MissingOverride](#missingoverride) - checkstyle - disabled
|
* [MissingOverride](#missingoverride) - checkstyle - disabled
|
||||||
|
@ -1396,6 +1396,22 @@ void getValue
|
||||||
();
|
();
|
||||||
````
|
````
|
||||||
|
|
||||||
|
#### [MethodTypeParameterName](http://checkstyle.sourceforge.net/config_naming.html#MethodTypeParameterName)
|
||||||
|
|
||||||
|
Restricts method generics parameters to be a single uppercase letter.
|
||||||
|
|
||||||
|
Valid:
|
||||||
|
````
|
||||||
|
List<A> getItems() {}
|
||||||
|
````
|
||||||
|
|
||||||
|
Invalid:
|
||||||
|
````
|
||||||
|
List<a> getItems() {}
|
||||||
|
List<BB> getItems() {}
|
||||||
|
List<C3> getItems() {}
|
||||||
|
````
|
||||||
|
|
||||||
#### [MissingDeprecated](http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated)
|
#### [MissingDeprecated](http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated)
|
||||||
|
|
||||||
Both the `@Deprecated` annotation and the Javadoc tag `@deprecated` must be used in pairs.
|
Both the `@Deprecated` annotation and the Javadoc tag `@deprecated` must be used in pairs.
|
||||||
|
@ -2690,10 +2706,6 @@ Couldn't get my IDE's (IntelliJ) code style to match.
|
||||||
|
|
||||||
Member variables should usually be named such that it is clear what they are. Comments for clarification should be the exception.
|
Member variables should usually be named such that it is clear what they are. Comments for clarification should be the exception.
|
||||||
|
|
||||||
#### [MethodTypeParameterName](http://checkstyle.sourceforge.net/config_naming.html#MethodTypeParameterName)
|
|
||||||
|
|
||||||
> TODO: enable
|
|
||||||
|
|
||||||
#### [MissingCtor](http://checkstyle.sourceforge.net/config_coding.html#MissingCtor)
|
#### [MissingCtor](http://checkstyle.sourceforge.net/config_coding.html#MissingCtor)
|
||||||
|
|
||||||
> TODO: enable
|
> TODO: enable
|
||||||
|
|
|
@ -141,6 +141,7 @@
|
||||||
</module>
|
</module>
|
||||||
<module name="MethodName"/> <!-- method names conform to ^[a-z][a-zA-Z0-9]*$ -->
|
<module name="MethodName"/> <!-- method names conform to ^[a-z][a-zA-Z0-9]*$ -->
|
||||||
<module name="MethodParamPad"/> <!-- verifies padding around method parameters -->
|
<module name="MethodParamPad"/> <!-- verifies padding around method parameters -->
|
||||||
|
<module name="MethodTypeParameterName"/> <!-- restrict method type parameters (i.e. generics) to ^[A-Z]$ -->
|
||||||
<module name="MissingDeprecated"/> <!-- @Deprecated annotation must be accompanied by javadoc @deprecated -->
|
<module name="MissingDeprecated"/> <!-- @Deprecated annotation must be accompanied by javadoc @deprecated -->
|
||||||
<module name="MissingSwitchDefault"/> <!-- switch must have a default -->
|
<module name="MissingSwitchDefault"/> <!-- switch must have a default -->
|
||||||
<module name="ModifiedControlVariable"> <!-- prevent for loop control being modified inside loop -->
|
<module name="ModifiedControlVariable"> <!-- prevent for loop control being modified inside loop -->
|
||||||
|
|
Loading…
Reference in a new issue