Error in SonarLint for Rider

Environment:

  • Programming language: c# & .net framework & .net core
  • OS: Windows 11
  • IDE: JetBrains Rider 2024.1.2
  • SonarLint plugin version:10.6.2.78685

Description of the problem / question:
SonarLint is not showing any output. Getting the following log:

 [2024-06-26T15:56:11.854] [SonarLint Server RPC request executor] ERROR sonarlint - File to analyze was not found in the file system: file:///C:/code/c#/operationweb/NetFramework/OperationWeb/H3.Operation.Web/Scripts/plugins/ionic/js/angular-sanitize.min.js.map
 [2024-06-26T15:56:11.854] [SonarLint Server RPC request executor] ERROR sonarlint - File to analyze was not found in the file system: file:///C:/code/c#/operationweb/NetFramework/OperationWeb/H3.Operation.Web/Scripts/plugins/bootstrap-toggle/bootstrap-toggle.min.js.map
 [2024-06-26T15:56:11.854] [SonarLint Server RPC request executor] ERROR sonarlint - File to analyze was not found in the file system: file:///C:/code/c#/operationweb/NetFramework/OperationWeb/H3.Operation.Web/Scripts/wangEditor/wangEditor.min.js.map
.......
 [2024-06-26T15:56:11.858] [sonarlint-analysis-engine] ERROR sonarlint - Error loading components for plugin 'codehawk'
java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/CheckRegistrar
	at org.codehawk.plugin.java.MyJavaRulesPlugin.define(MyJavaRulesPlugin.java:17)
	at org.sonarsource.sonarlint.core.plugin.commons.ExtensionInstaller.install(ExtensionInstaller.java:52)
	at org.sonarsource.sonarlint.core.analysis.container.global.AnalysisExtensionInstaller.install(AnalysisExtensionInstaller.java:44)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.addPluginExtensions(AnalysisContainer.java:114)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doBeforeStart(AnalysisContainer.java:63)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:180)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.java.api.CheckRegistrar
	... 13 more
.......
 [2024-06-26T15:56:11.862] [sonarlint-analysis-engine] INFO sonarlint - Index files
 [2024-06-26T15:56:11.876] [Report about progress of file indexation] INFO sonarlint - 264 files indexed
 [2024-06-26T15:56:11.886] [sonarlint-analysis-engine] ERROR org.sonarsource.sonarlint.omnisharp.OmnisharpSensor - Timeout waiting for the solution to be loaded. You can find help on https://docs.sonarsource.com/sonarlint/intellij/using-sonarlint/scan-my-project/#supported-features-in-rider or https://docs.sonarsource.com/sonarlint/vs-code/getting-started/requirements/#c-analysis

Hey there.

This looks like an issue with GitHub - SEPMLAB/CodeHawk. I suggest raising an issue on their repository.

In the meantime if it’s preventing SonarLint from working entirely, you can either stop using connected mode or uninstall the plugin from your SonarQube server.

I rolled back the Sonarlint plugin version to 9.1.0.75538, and now the reports display correctly. :upside_down_face:

Hey @Astolfo_Luo, we released SonarLint 10.7, which tackles the issue of files not being found. Could you please update and see if you still face any issues?

Regarding the CodeHawk error, this is an old issue that was raised in 2021 and has not yet been fixed. CodeHawk doesn’t declare a dependency on our Java analyzer properly and consequently fails to be loaded.