All my source code is designed and compiled against the most recent version of Java 1.8 and builds just fine in IntelliJ IDEA Community 2019.2 (when set to a project JDK of 1.8, obviously).
I have access to a SonarQube server instance and want to run code analysis on a new project, but the SonarQube version is about 18 months old, i.e. SonarQube 7.0.36138, with a SonarJava plugin of 5.3.13828. My management team are currently ‘unwilling’ to change that for fear of breaking the analysis of other Java projects.
As an alternative, I can use SonarScanner to do our analysis: this works and will update the SQ dashboard, but I’d much prefer to use the IntelliJ SonarLint plugin to get code analysis directly inside IntelliJ (and send results to the SQ binding).
So I tried installing the latest version of SonarLint (220.127.116.1134) from the IntelliJ marketplace. It is all configured and connects OK to the SQ binding but, when I run a code analysis, all I’m getting is:
File won’t be refreshed because there were errors during analysis
against every file. The log provides other output, such as the plugins that were loaded, e.g.:
Found plugin: sonar-java-plugin-18.104.22.16888.jar
but no other reason as to why the scan is failing.
My assumption is that there is some JDK version incompatibility going on somewhere - but that’s a guess and I’m stuck as regards a way to proceed; in a way, I would have thought that an older version of SQ would have been OK for analysing 1.8 Java…
Can anyone explain why I’m getting these blanket error messages and what my options are here for providing myself with SonarLint capability ? Any way of analysing my 1.8 code with the versions of everything that I’ve got ?