I get “Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.” using SonarLint with Gradle (with target :sonarlintMain, but not with :sonarlintTest). How do I enable this DEBUG mode?
DEBUG Log of SonarLint Analysis : you can raise the log level by enabling the 2 options: Analysis logs and Verbose output . From the SonarLint Console, click the settings gear wheel on the right, it will open a dropdown which will let you select one by one the Analysis logs and Verbose output. Please note that the 2 options have to be checked in order to have the highest level of verbosity in logs.
I have no errors in IntelliJ (though thanks for the info, I now have it set by default in IntelliJ). My problem only appears when I run SonarLint directly via Gradle, for example ./gradlew check. What do I need to set in my build.gradle (or other) file to turn on DEBUG mode?
Hello Jeslie, are you talking about the SonarLint Gradle plugin?
If so, according to their documentation, you might want to add something like sonarProperty("sonar.debug", "true")
somewhere in your build.gradle
.
If you have any trouble with this plugin, I suggest that you raise the point to the original author, e.g in their Gitlab’s issues section - this is a community plugin which is not supported by SonarSource, as far as I can tell.