Build is succesful but Getting old checkstyle issue of previous code failing in staticCodeQuality

2020-07-28 12:58:58,930 staticCodeQuality-a71f6245-0249-42f6-9ed7-261d38d66d1a INFO Running gradle to check static code quality
2020-07-28 12:59:34,941 staticCodeQuality-a71f6245-0249-42f6-9ed7-261d38d66d1a INFO
Build logs:
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing

Task :compileJava NO-SOURCE
Task :processResources NO-SOURCE
Task :classes UP-TO-DATE

Task :spotbugsMain
The following classes needed for analysis were missing:
org.springframework.data.mongodb.repository.MongoRepository
com.fasterxml.jackson.core.type.TypeReference
com.google.common.io.Resources
org.springframework.boot.SpringApplication
org.apache.logging.log4j.Logger
org.modelmapper.ModelMapper
org.apache.logging.log4j.LogManager
com.fasterxml.jackson.databind.node.JsonNodeFactory
com.fasterxml.jackson.databind.JsonNode
com.fasterxml.jackson.databind.node.ArrayNode
com.fasterxml.jackson.databind.node.ObjectNode
com.fasterxml.jackson.databind.ObjectMapper
org.springframework.http.ResponseEntity
org.springframework.http.ResponseEntity$BodyBuilder

Task :qeatsbackend:compileJava UP-TO-DATE
Task :qeatsbackend:processResources
Task :qeatsbackend:classes

Task :qeatsbackend:spotbugsMain
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Task :checkstyleMain NO-SOURCE

Task :qeatsbackend:checkstyleMain
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/controller/RestaurantController.java:51: ‘@’ has incorrect indentation level 4, expected level should be 6. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:26: ‘member def modifier’ has incorrect indentation level 4, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:30: ‘member def modifier’ has incorrect indentation level 4, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:34: ‘member def type’ has incorrect indentation level 4, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:36: ‘ctor def modifier’ has incorrect indentation level 4, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:39: ‘ctor def’ child has incorrect indentation level 6, expected level should be 4. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:40: ‘ctor def’ child has incorrect indentation level 6, expected level should be 4. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsRequest.java:42: ‘ctor def rcurly’ has incorrect indentation level 4, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsResponse.java:51: Line is longer than 100 characters (found 105). [LineLength]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsResponse.java:51:38: WhitespaceAround: ‘{’ is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) [WhitespaceAround]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsResponse.java:52: ‘ctor def rcurly’ has incorrect indentation level 8, expected level should be 2. [Indentation]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/exchanges/GetRestaurantsResponse.java:52:1: Line contains a tab character. [FileTabCharacter]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/services/RestaurantServiceImpl.java:58:12: Local variable name ‘ServingRadiusInKms’ must match pattern ‘^a-z?$’. [LocalVariableName]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/services/RestaurantServiceImpl.java:60:42: WhitespaceAround: ‘=’ is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) [WhitespaceAround]
[ant:checkstyle] [ERROR] /saurabhpawale77-ME_QEATS_V2-a71f6245-0249-42f6-9ed7-261d38d66d1a/saurabhpawale77-ME_QEATS_V2/qeatsbackend/src/main/java/com/crio/qeats/services/RestaurantServiceImpl.java:64: ‘method def’ child has incorrect indentation level 5, expected level should be 4. [Indentation]

Task :qeatsbackend:checkstyleMain FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:qeatsbackend:checkstyleMain’.

Checkstyle rule violations were found. See the report at: file:///tmp/external_build/reports/checkstyle/main.html
Checkstyle files with violations: 4
Checkstyle violations by severity: [error:15]

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 34s
5 actionable tasks: 4 executed, 1 up-to-date

2020-07-28 12:59:34,945 staticCodeQuality-a71f6245-0249-42f6-9ed7-261d38d66d1a INFO Gradle run complete
2020-07-28 12:59:34,945 staticCodeQuality-a71f6245-0249-42f6-9ed7-261d38d66d1a INFO Build failed

Hey,

I just triggered your assessment from my side. Can you please check ?


same iisue

@gouravsardana can you look into this

Hey,

Can you please resolve your checkstyle issues. Once you resolve it your static code quality will pass :slight_smile:

@gouravsardana this checkstyle issue are of my previous code in current code i don’t find this checkstyle issues.

it is showing checkstyle issue of previous git commit @gouravsardana

Hey,

I just check you have a different branch called remotes/origin/master. I checkout to master and run the build. It is showing checkstyles issues.

Please find attached the screenshot -

Thanks man for changing branch it is working now

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.