When running sonar on my java project ,the sonar run fails because of a preprocessor usage in java code. Below is the exception
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Can not execute Checkstyle
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Exception was thrown while processing SomeClass.java
It appears that in the java file , sonar failed to identify or ignore the pre-processor conditions
#if SOMEVAR!="abc"
#endif
Is there any way to tell sonar to ignore or identify the preprocessors in java code. I want sonar to continue with the scan.