Description
Sonar version: 9.9.1
Checkstyle sonar plugin version: 10.9.3
I have recently upgraded to this version of sonar and checkstyle check is being executed on my code. In console output it shows an error as follows:
06:48:43 06:48:43.253 ERROR: Error during SonarScanner execution
06:48:43 java.lang.IllegalStateException: Can not execute Checkstyle
06:48:43 at org.sonar.plugins.checkstyle.CheckstyleExecutor.executeWithClassLoader(CheckstyleExecutor.java:113)
......................
06:48:43 Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Exception was thrown while processing xyz.java
......................
06:48:43 Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: IllegalStateException occurred while parsing file xyz.java
.....................
06:48:43 Caused by: java.lang.IllegalStateException: 1:7: no viable alternative at input 'void'
06:48:43 at com.puppycrawl.tools.checkstyle.JavaParser$CheckstyleErrorListener.syntaxError(JavaParser.java:255)
......................
06:48:43 Caused by: org.antlr.v4.runtime.NoViableAltException
Can you please let me know, what this error is about. What are the ways to overcome this and also can you please let me know is it possible to disable or remove these kind of checkstyle checks? If yes, how to do that.
Thank you.