since the new update following error occurs due to binding update.
Environment:
Java: JetBrains s.r.o. 11.0.13
OS: Windows 10 amd64
IDE: IntelliJ IDEA 2021.3.1
SonarLint: 6.4.0.41939
java.lang.NullPointerException: HTML description is mandatory in SonarLint
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at o.ss.sl.core.rule.extractor.SonarLintRuleDefinition.<init>(SonarLintRuleDefinition.java:53)
at o.ss.sl.core.rule.extractor.RulesDefinitionExtractor.extractRules(RulesDefinitionExtractor.java:57)
at o.ss.sl.core.AbstractSonarLintEngine.loadPluginMetadata(AbstractSonarLintEngine.java:83)
at o.ss.sl.core.ConnectedSonarLintEngineImpl.loadAnalysisContext(ConnectedSonarLintEngineImpl.java:160)
at o.ss.sl.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:152)
at o.ss.sl.core.ConnectedSonarLintEngineImpl.<init>(ConnectedSonarLintEngineImpl.java:142)
at o.sl.ij.core.SonarLintEngineFactory.createEngine(SonarLintEngineFactory.java:95)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
at o.sl.ij.core.SonarLintEngineManager.getConnectedEngine(SonarLintEngineManager.java:134)
at o.sl.ij.config.project.SonarLintProjectBindPanel.downloadProjectList(SonarLintProjectBindPanel.java:157)
at o.sl.ij.config.project.SonarLintProjectBindPanel$2.actionPerformed(SonarLintProjectBindPanel.java:247)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
We did a major code cleanup in this version (to prepare for incremental sync in connected mode) and we may have broken something.
To be sure of the source of the issue, can you please confirm that you have (at least) one custom rules plugin deployed on your SonarQube server?
This might be a bit advanced question if you are not the developer of this custom rules plugin, but just in case, do you know if this custom rules plugin have some rules without descriptions, or if they are using markdown description?
Hi,
I get the same issue on a fresh install of sonarqube Version 9.2.4 (build 50792) on Linux and a clean installation of the plugin on my dev env. So it is not related to custom rules.
IDE Environment:
Java: J11.0.13+7-b1751.21 aarch64
OS: MacOS 12.1 Apple M1 Max (but same syndrome on an intel mac)
The issue goes away with plugin sonarlint-intellij-6.3.1.40498.zip
But only if I manually clean out the previous sonarlint artefacts from the IntelliJ directories. Places like:
@Paul_Schleger I can not reproduce with a clean install of SonarQube 9.2.4. Are you sure you had the SonarLint binding updated? Can you double check you don’t have any custom plugin on SonarQube (in doubt, please send me the output of /api/plugins/installed)
I was about to get the information you requested, but couldn’t actually find that directory on the Linux server or my macbook. Since the macbook is quite new and was setup from scratch very recently, I decided to just delete IntelliJ and any app support stuff:
Reinstalled IntelliJ IDEA from scratch, installed sonarlint 6.4.0.41939, setup my SonarQube connection, bound the project to SonarQube and the error no longer appears.
So the good news is, it “works on my machine” now too. The bad news is, I can’t reproduce the issue anymore. All I can say is that a full clean-out of everything IntelliJ IDEA related on the IDE side seems to be a workaround.
@Julien_HENRY I have the same issue as described here above. When using the new artifact (6.4.1.42104) SonarLint works normal again. When putting back the old artifact (6.4.0.41939), the NullPointerException returns again. So for me, the fix is working.
OS: Windows 10.0.19042.1415
IDE: IntelliJ IDEA 2021.3.1
SonarLint: 6.4.0.41939
Sonarqube: Community EditionVersion 8.9.6 (build 50800)