Error during execution of SonarLint analysis - JsonSyntaxException: duplicate key: squid:Indentation

Please provide

  • Operating system: RedHat 7.9
  • SonarLint plugin version: 7.5.0.54140
  • Programming language you’re coding in: Java
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

I am not able to do Sonarlint analysis on my code. I this in the Sonarlint Console when I try:

Trigger: EDITOR_CHANGE
Clear markers on 0 excluded files
SonarLint processing file /testprogram_checker/src/javafiles/FlowSetupItem.java…
Standalone mode (project not bound)
Error during execution of SonarLint analysis
org.sonarsource.sonarlint.shaded.com.google.gson.JsonSyntaxException: duplicate key: squid:IndentationCheck
at org.sonarsource.sonarlint.shaded.com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190)
at org.sonarsource.sonarlint.shaded.com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
at org.sonarsource.sonarlint.shaded.com.google.gson.Gson.fromJson(Gson.java:991)
at org.sonarsource.sonarlint.shaded.com.google.gson.Gson.fromJson(Gson.java:956)
at org.sonarsource.sonarlint.shaded.com.google.gson.Gson.fromJson(Gson.java:905)
at org.sonarlint.eclipse.core.internal.preferences.SonarLintGlobalConfiguration.deserializeRulesJson(SonarLintGlobalConfiguration.java:263)
at org.sonarlint.eclipse.core.internal.preferences.SonarLintGlobalConfiguration.readRulesConfig(SonarLintGlobalConfiguration.java:240)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.prepareAnalysisConfig(AnalyzeStandaloneProjectJob.java:48)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.prepareAnalysisConfig(AnalyzeStandaloneProjectJob.java:1)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:195)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:157)
at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Also when I go the Sonarlint preferences and then click on “Rules Configuration” I get a dialog that pops up that says “Could Not Accept Changes - The currently displayed page contains invalid values.”

I am using Eclipse version 2022-09(4.25.0) Build id: 20220908-1902

I don’t have any idea what the issue is

Mike

The problem appears to be some unknown eclipse install problem. I reinstalled Eclipse 2022-09 from scratch and now Sonarlint is working fine.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.