Checkstyle Results

The following document contains the results of Checkstyle 6.18 with google_checks.xml ruleset. rss feed

Summary

Files  Info  Warnings  Errors
27 0 129 0

Rules

Category Rule Violations Severity
blocks NeedBraces 6  Warning
coding OverloadMethodsDeclarationOrder 1  Warning
VariableDeclarationUsageDistance 1  Warning
imports CustomImportOrder
  • sortImportsInGroupAlphabetically: "true"
  • specialImportsRegExp: "com.google"
  • customImportOrderRules: "STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"
50  Warning
indentation CommentsIndentation 3  Warning
javadoc JavadocMethod
  • scope: "public"
  • allowMissingThrowsTags: "true"
  • allowThrowsTagsForSubclasses: "true"
  • allowMissingReturnTag: "true"
  • allowMissingParamTags: "true"
  • minLineCount: "2"
  • allowedAnnotations: "Override, Test"
17  Warning
NonEmptyAtclauseDescription 10  Warning
SummaryJavadoc
  • forbiddenSummaryFragments: "^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"
7  Warning
naming CatchParameterName
  • format: "^[a-z][a-z0-9][a-zA-Z0-9]*$"
7  Warning
LocalVariableName
  • format: "^[a-z][a-z0-9][a-zA-Z0-9]*$"
  • allowOneCharVarInForLoop: "true"
  • tokens: "VARIABLE_DEF"
2  Warning
ParameterName
  • format: "^[a-z][a-z0-9][a-zA-Z0-9]*$"
2  Warning
sizes LineLength
  • max: "100"
  • ignorePattern: "^package.*|^import.*|a href|href|http://|https://|ftp://"
6  Warning
whitespace GenericWhitespace 1  Warning
WhitespaceAround
  • allowEmptyConstructors: "true"
  • allowEmptyMethods: "true"
  • allowEmptyLoops: "true"
  • allowEmptyTypes: "true"
16  Warning

Details

com/ctrip/framework/apollo/common/controller/ApolloInfoController.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.Apollo' import. Should be before 'org.springframework.web.bind.annotation.RestController'. 6
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.foundation.Foundation' import. Should be before 'org.springframework.web.bind.annotation.RestController'. 7

com/ctrip/framework/apollo/common/controller/CatConfig.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.boot.context.embedded.FilterRegistrationBean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 5
 Warning imports CustomImportOrder Import statement for 'org.springframework.boot.context.embedded.ServletListenerRegistrationBean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 6
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Bean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 7
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Configuration' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 8
 Warning imports CustomImportOrder Import statement for 'com.dianping.cat.servlet.CatFilter' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 10
 Warning imports CustomImportOrder Import statement for 'com.dianping.cat.servlet.CatListener' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 11
 Warning javadoc JavadocMethod Missing a Javadoc comment. 16
 Warning javadoc JavadocMethod Missing a Javadoc comment. 26

com/ctrip/framework/apollo/common/controller/CharacterEncodingFilterConfiguration.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.boot.context.embedded.FilterRegistrationBean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 5
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Bean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 6
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Configuration' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 7
 Warning imports CustomImportOrder Import statement for 'org.springframework.web.filter.CharacterEncodingFilter' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 8
 Warning javadoc JavadocMethod Missing a Javadoc comment. 13
 Warning indentation CommentsIndentation Comment has incorrect indentation level 4, expected is 0, indentation should be the same level as line 19. 18
 Warning indentation CommentsIndentation Comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 20. 19

com/ctrip/framework/apollo/common/controller/GlobalDefaultExceptionHandler.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.exception.AbstractBaseException' import. Should be before 'org.springframework.web.client.HttpStatusCodeException'. 15
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.exception.BadRequestException' import. Should be before 'org.springframework.web.client.HttpStatusCodeException'. 16
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.exception.NotFoundException' import. Should be before 'org.springframework.web.client.HttpStatusCodeException'. 17
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.dianping.cat.Cat' import. Should be before 'org.springframework.web.client.HttpStatusCodeException'. 18
 Warning imports CustomImportOrder Import statement for 'com.google.gson.Gson' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting group 'STANDARD_JAVA_PACKAGE' on this line. 19
 Warning imports CustomImportOrder Import statement for 'com.google.gson.reflect.TypeToken' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting group 'STANDARD_JAVA_PACKAGE' on this line. 20
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.HttpStatus.BAD_REQUEST' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line. 31
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line. 32
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.HttpStatus.NOT_FOUND' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line. 33
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.HttpStatus.UNAUTHORIZED' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line. 34
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.MediaType.APPLICATION_JSON' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line. 35
 Warning sizes LineLength Line is longer than 100 characters (found 109). 58
 Warning javadoc JavadocMethod Missing a Javadoc comment. 68
 Warning sizes LineLength Line is longer than 100 characters (found 108). 90
 Warning indentation CommentsIndentation Comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 105. 104

com/ctrip/framework/apollo/common/controller/HttpMessageConverterConfiguration.java

Severity Category Rule Message Line
 Warning javadoc JavadocMethod Missing a Javadoc comment. 22

com/ctrip/framework/apollo/common/controller/WebMvcConfig.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Configuration' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 5
 Warning imports CustomImportOrder Import statement for 'org.springframework.data.domain.PageRequest' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 6
 Warning imports CustomImportOrder Import statement for 'org.springframework.data.web.PageableHandlerMethodArgumentResolver' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 7
 Warning imports CustomImportOrder Import statement for 'org.springframework.http.MediaType' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 8
 Warning imports CustomImportOrder Import statement for 'org.springframework.web.method.support.HandlerMethodArgumentResolver' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 9
 Warning imports CustomImportOrder Import statement for 'org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 10
 Warning imports CustomImportOrder Import statement for 'org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 11

com/ctrip/framework/apollo/common/customize/LoggingCustomizer.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Wrong lexicographical order for 'ch.qos.logback.classic.LoggerContext' import. Should be before 'org.springframework.util.ReflectionUtils'. 15
 Warning imports CustomImportOrder Wrong lexicographical order for 'ch.qos.logback.core.Appender' import. Should be before 'org.springframework.util.ReflectionUtils'. 16
 Warning coding VariableDeclarationUsageDistance Distance between variable 'loggerContext' declaration and its first usage is 5, but allowed 3. Consider to make that variable as final if you still need to store its value in advance (before method calls that might do side effect on original value). 52
 Warning naming LocalVariableName Local variable name 'cLoggingAppender' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 54
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 72
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 74
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 78
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 80

com/ctrip/framework/apollo/common/datasource/TitanCondition.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.utils.StringUtils' import. Should be before 'org.springframework.core.type.AnnotatedTypeMetadata'. 7

com/ctrip/framework/apollo/common/datasource/TitanEntityManager.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.beans.factory.annotation.Autowired' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 7
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Bean' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 8
 Warning imports CustomImportOrder Import statement for 'org.springframework.context.annotation.Conditional' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 9
 Warning imports CustomImportOrder Import statement for 'org.springframework.stereotype.Component' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 10
 Warning imports CustomImportOrder Import statement for 'com.dianping.cat.Cat' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 12
 Warning javadoc JavadocMethod Missing a Javadoc comment. 21

com/ctrip/framework/apollo/common/datasource/TitanSettings.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.enums.Env' import. Should be before 'org.springframework.stereotype.Component'. 6
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.apollo.core.enums.EnvUtils' import. Should be before 'org.springframework.stereotype.Component'. 7
 Warning imports CustomImportOrder Wrong lexicographical order for 'com.ctrip.framework.foundation.Foundation' import. Should be before 'org.springframework.stereotype.Component'. 8
 Warning javadoc JavadocMethod Missing a Javadoc comment. 31
 Warning javadoc JavadocMethod Missing a Javadoc comment. 50

com/ctrip/framework/apollo/common/entity/App.java

Severity Category Rule Message Line
 Warning javadoc JavadocMethod Missing a Javadoc comment. 82

com/ctrip/framework/apollo/common/entity/AppNamespace.java

Severity Category Rule Message Line
 Warning naming ParameterName Parameter name 'aPublic' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 62

com/ctrip/framework/apollo/common/entity/BaseEntity.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'com.google.common.base.MoreObjects' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting not assigned imports on this line. 15
 Warning imports CustomImportOrder Import statement for 'com.google.common.base.MoreObjects.ToStringHelper' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting not assigned imports on this line. 16
 Warning blocks NeedBraces 'if' construct must use '{}'s. 92
 Warning blocks NeedBraces 'if' construct must use '{}'s. 93
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 114

com/ctrip/framework/apollo/common/http/MultiResponseEntity.java

Severity Category Rule Message Line
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 8
 Warning javadoc JavadocMethod Missing a Javadoc comment. 29
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 30

com/ctrip/framework/apollo/common/http/RichResponseEntity.java

Severity Category Rule Message Line
 Warning whitespace GenericWhitespace GenericWhitespace '>' should followed by whitespace. 5
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 5
 Warning javadoc JavadocMethod Missing a Javadoc comment. 11
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 11
 Warning javadoc JavadocMethod Missing a Javadoc comment. 19
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 19

com/ctrip/framework/apollo/common/utils/BeanUtils.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.beans.BeanWrapper' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 13
 Warning imports CustomImportOrder Import statement for 'org.springframework.beans.BeanWrapperImpl' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 14
 Warning imports CustomImportOrder Import statement for 'org.springframework.util.CollectionUtils' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 15
 Warning javadoc NonEmptyAtclauseDescription Javadoc comment at column 14 has parse error. Missed HTML close tag 'UserDTO'. Sometimes it means that close tag missed for one of previous tags. 23
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 53
 Warning blocks NeedBraces 'if' construct must use '{}'s. 67
 Warning javadoc NonEmptyAtclauseDescription Javadoc comment at column 22 has parse error. Details: no viable alternative at input '<pre>\n * List<UserDTO> userList = userService.queryUsers();\n * Map<Integer,' while parsing HTML_TAG 78
 Warning blocks NeedBraces 'if' construct must use '{}'s. 92
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 97
 Warning javadoc NonEmptyAtclauseDescription Javadoc comment at column 23 has parse error. Details: no viable alternative at input '<pre>\n * List<ShopDTO> shopList = shopService.queryShops();\n * Map<Integer,' while parsing HTML_TAG 108
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) 114
 Warning blocks NeedBraces 'if' construct must use '{}'s. 120
 Warning naming LocalVariableName Local variable name 'k' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 123
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 129
 Warning javadoc NonEmptyAtclauseDescription Javadoc comment at column 13 has parse error. Missed HTML close tag 'Integer'. Sometimes it means that close tag missed for one of previous tags. 140
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) 146
 Warning blocks NeedBraces 'if' construct must use '{}'s. 152
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 157
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 172
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 179
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 189
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 195
 Warning naming CatchParameterName Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 205
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 210
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 212
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 213
 Warning javadoc SummaryJavadoc First sentence of Javadoc is incomplete (period is missing) or not present. 219
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 222
 Warning javadoc NonEmptyAtclauseDescription At-clause should have a non-empty description. 223
 Warning sizes LineLength Line is longer than 100 characters (found 143). 229

com/ctrip/framework/apollo/common/utils/ExceptionUtils.java

Severity Category Rule Message Line
 Warning imports CustomImportOrder Import statement for 'org.springframework.web.client.HttpStatusCodeException' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 6
 Warning imports CustomImportOrder Import statement for 'com.google.common.base.MoreObjects' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting not assigned imports on this line. 8
 Warning imports CustomImportOrder Import statement for 'com.google.gson.Gson' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting not assigned imports on this line. 9
 Warning imports CustomImportOrder Import statement for 'com.google.gson.reflect.TypeToken' is in the wrong order. Should be in the 'SPECIAL_IMPORTS' group, expecting not assigned imports on this line. 10
 Warning javadoc JavadocMethod Missing a Javadoc comment. 18
 Warning naming ParameterName Parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. 18

com/ctrip/framework/apollo/common/utils/InputValidator.java

Severity Category Rule Message Line
 Warning sizes LineLength Line is longer than 100 characters (found 113). 13
 Warning sizes LineLength Line is longer than 100 characters (found 112). 15
 Warning javadoc JavadocMethod Missing a Javadoc comment. 27
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 27
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 28
 Warning sizes LineLength Line is longer than 100 characters (found 124). 31

com/ctrip/framework/apollo/common/utils/RequestPrecondition.java

Severity Category Rule Message Line
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 21
 Warning coding OverloadMethodsDeclarationOrder Overload methods should not be split. Previous overloaded method located at line '17'. 25
 Warning javadoc JavadocMethod Missing a Javadoc comment. 25
 Warning javadoc JavadocMethod Missing a Javadoc comment. 31
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 31
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 32
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 33
 Warning javadoc JavadocMethod Missing a Javadoc comment. 39
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 39
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 40
 Warning whitespace WhitespaceAround WhitespaceAround: '{' is not preceded with whitespace. 41