New checks in release 1.0.4:
Sources:
ForbidAnnotationCheck - Forbid specific annotation for field/method, e.g. forbid @Autowired annotation for private field. Done by Victor Hidoyatov. (issue).
AvoidConstantsInInterfacesCheck - avoid declaration of constants in interfaces. Done by Vladimir Svikhunov. (Issue) .
AvoidHidingCauseExceptionCheck - hiding Cause exception in throwing new exception. Done by Daniil Yaroslavtsev. (issue).
AvoidNotShortCircuitOperatorsForBooleanCheck - Forbid to use "|", "|=", "&" for boolean/Boolean variables, and force to use "||", .... , explanation link. Example: "boolean b |= returnBoolean()". Done by Daniil Yaroslavtsev. (issue) .
IllegalCatchCheck - Options to ignore 1) exact re-throw after logging 2) creation and throw of other Exception base on current exception. Done by Daniil Yroslavtsev. (issue).
OverridableMethodInConstructorCheck - Do not use protected/public method in C-tor. Use only private and final. Check all call hierarchy from c-tor to avoid: c-tor -> private -> public/protected. Done by Daniil Yaroslavtsev. (issue).
ReturnBooleanFromTernary - It is a bad practice to return boolean values from ternary operations. Just use the value inside branch instead. Done by Ivan Sopov.
ReturnNullInsteadOfBoolean - Arguably it is the matter of style to use Boolean for ternary logic or enum. And since all the information is in the single file and even in the single method, I think that checkstyle is capable of doing this. Done by Ivan Sopov. (issue)
VariableDeclarationUsageDistanceCheck - check distance between declaration of variable and its first usage of it. Options: Allowed distance (in rows); Ignore variable names (regexp). Done by Ruslan Diachenko. (issue).
AbbreviationAsWordInNameCheck - XMLReader should be names like XmlReader. Checks names for fields, methods , ....... . Few ignore options. Done by Roman Ivanov. (issue).
Sources:
Update site for Eclipse (EclipseCS plugin is required):
Discussion is here:
http://habrahabr.ru/blogs/java/130668/
http://habrahabr.ru/blogs/java/130668/
ForbidAnnotationCheck - Forbid specific annotation for field/method, e.g. forbid @Autowired annotation for private field. Done by Victor Hidoyatov. (issue).
AvoidConstantsInInterfacesCheck - avoid declaration of constants in interfaces. Done by Vladimir Svikhunov. (Issue) .
AvoidHidingCauseExceptionCheck - hiding Cause exception in throwing new exception. Done by Daniil Yaroslavtsev. (issue).
AvoidNotShortCircuitOperatorsForBooleanCheck - Forbid to use "|", "|=", "&" for boolean/Boolean variables, and force to use "||", .... , explanation link. Example: "boolean b |= returnBoolean()". Done by Daniil Yaroslavtsev. (issue) .
IllegalCatchCheck - Options to ignore 1) exact re-throw after logging 2) creation and throw of other Exception base on current exception. Done by Daniil Yroslavtsev. (issue).
OverridableMethodInConstructorCheck - Do not use protected/public method in C-tor. Use only private and final. Check all call hierarchy from c-tor to avoid: c-tor -> private -> public/protected. Done by Daniil Yaroslavtsev. (issue).
ReturnBooleanFromTernary - It is a bad practice to return boolean values from ternary operations. Just use the value inside branch instead. Done by Ivan Sopov.
ReturnNullInsteadOfBoolean - Arguably it is the matter of style to use Boolean for ternary logic or enum. And since all the information is in the single file and even in the single method, I think that checkstyle is capable of doing this. Done by Ivan Sopov. (issue)
VariableDeclarationUsageDistanceCheck - check distance between declaration of variable and its first usage of it. Options: Allowed distance (in rows); Ignore variable names (regexp). Done by Ruslan Diachenko. (issue).
AbbreviationAsWordInNameCheck - XMLReader should be names like XmlReader. Checks names for fields, methods , ....... . Few ignore options. Done by Roman Ivanov. (issue).
No comments:
Post a Comment