SonarLint with Eclipse IDE in Windows 11 using WSL2

Hello,

I’m trying to use SonarLint plugin for Eclipse in Windows 11 using WSL2 (Ubuntu) but no luck. My project written in C++ based on CMake (under Linux Ubuntu), but please note that I’m opening the project from Windows Eclipse IDE. I’m connected to SonarCloud. I’ve tried to open Eclipse IDE in WSL Ubuntu, but get the same result:

SonarLint processing file /cpp/algos/bquant.cpp…
Triggering analysis with configuration: [
baseDir: /home/lohanyan/work/indra/cpp
extraProperties: {sonar.project.monorepo.enabled=false, sonaranalyzer-cs.nuget.packageVersion=9.32.0.97167, sonaranalyzer.security.cs.pluginVersion=10.8.0.33361, sonar.cs.ignoreHeaderComments=true, sonar.c.file.suffixes=.c,.h, sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts, sonar.python.coverage.reportPaths=coverage-reports/coverage-.xml, sonar.sensor.cache.enable=true, sonar.text.activate=true, sonaranalyzer-vbnet.nuget.packageVersion=9.32.0.97167, sonar.cobol.dialect=ibm-enterprise-cobol, sonar.go.file.suffixes=.go, sonar.cpd.cobol.minimumLines=30, sonar.cobol.exec.recoveryMode=true, block_report_submission_subscription_type=DISABLED, sonar.cs.analyzeRazorCode=true, sonar.locationChecksums=true, email.fromName=SonarCloud, block_project_provisioning_subscription_type=DISABLED, sonar.python.xunit.skipDetails=false, sonar.ipynb.file.suffixes=ipynb, sonar.dbcleaner.weeksBeforeKeepingOnlyAnalysesWithVersion=104, sonar.plsql.jdbc.driver.class=oracle.jdbc.OracleDriver, sonar.pullrequest.github.summary_comment=true, sonar.go.exclusions=/vendor/, sonar.php.exclusions=/vendor/, sonar.terraform.file.suffixes=.tf, sonar.forceAuthentication=false, sonar.plugins.loadAll=false, java_11_eos_date=2024-01-15, sonar.notifications.delay=60, sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp,.ixx,.mxx,.cppm,.ccm,.cxxm,.c++m, sonar.swift.file.suffixes=.swift, sonar.vbnet.roslyn.ignoreIssues=false, sonar.plsql.ignoreHeaderComments=false, sonar.flex.file.suffixes=as, sonar.jcl.file.suffixes=.jcl, sonaranalyzer.security.cs.nuget.packageVersion=10.8.0.33361, sonar.filesize.limit=20, sonar.ruby.file.suffixes=.rb, sonaranalyzer-cs.ruleNamespace=SonarAnalyzer.CSharp, sonar.pli.extralingualCharacters=#@$, sonar.azureresourcemanager.file.identifier=https://schema.management.azure.com/schemas/, sonar.cs.analyzeGeneratedCode=false, sonar.python.xunit.reportPath=xunit-reports/xunit-result-.xml, sonar.java.jvmframeworkconfig.file.patterns=/src/main/resources//application.properties,/src/main/resources//application*.yaml,/src/main/resources//application*.yml, sonar.pli.marginLeft=2, sonar.builtInQualityProfiles.disableNotificationOnUpdate=false, sonar.javascript.globals=angular,goog,google,OpenLayers,d3,dojo,dojox,dijit,Backbone,moment,casper,_,sap, sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay=24, sonar.yaml.file.suffixes=.yaml,.yml, sonar.terraform.activate=true, sonar.css.file.suffixes=.css,.less,.scss,.sass, sonar.organizations.createPersonalOrg=true, sonar.cpd.abap.minimumTokens=100, sonar.docker.file.patterns=Dockerfile,.dockerfile, delete_old_projects_excluded_project_kees=brave_brave-core,simgrid_simgrid,apache_struts,microsoft_vscode-python,mediawiki-core,jhipster-sample-application,JMeter,typo3,org.xwiki.platform:xwiki-platform,apache_ofbiz-framework,org.nuxeo:nuxeo-ecm,monica,sonarlint-visualstudio, sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig, sonaranalyzer-vbnet.nuget.packageId=SonarAnalyzer.VisualBasic, sonar.php.frameworkDetection=true, sonar.vb.file.suffixes=.bas,.frm,.ctl, email.from=noreply@sonarcloud.io, sonaranalyzer-vbnet.pluginVersion=9.32.0.97167, sonar.vbnet.ignoreHeaderComments=true, sonar.rpg.leftMarginWidth=12, sonar.cfamily.compile-commands=/home/lohanyan/main/activeloopai/indra/builds/tests/compile_commands.json, sonaranalyzer.security.cs.analyzerId=SonarAnalyzer.Security, sonar.scanner.force-deprecated-java-version=false, sonaranalyzer.security.cs.nuget.packageId=SonarAnalyzer.Security, sonar.cfamily.build-wrapper-output=/home/lohanyan/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/cpp/org.sonarlint.eclipse.core/sonarlint5412105473556536785, sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek=1, sonaranalyzer-vbnet.analyzerId=SonarAnalyzer.VisualBasic, email.prefix=[SonarCloud], sonar.scala.file.suffixes=.scala, sonar.cs.roslyn.ignoreIssues=false, delete_old_projects_deployment_date=1671634414000, sonar.cobol.byteBasedColumnCount=false, sonar.cloudformation.activate=true, sonar.pli.marginRight=72, sonaranalyzer-cs.pluginKey=csharp, sonar.kubernetes.activate=true, sonar.cpd.cobol.minimumTokens=100, sonar.java.ignoreUnnamedModuleForSplitPackage=False, sonar.json.file.suffixes=.json, sonaranalyzer.security.cs.pluginKey=securitycsharpfrontend, sonar.auth.microsoft.enabled=true, sonar.vb.ignoreHeaderComments=true, sonar.cfamily.useCache=false, sonar.apex.file.suffixes=.cls,.trigger, sonaranalyzer-vbnet.ruleNamespace=SonarAnalyzer.VisualBasic, suspend_analysis_of_projects=OXYGEN:, sonar.cloudformation.file.identifier=AWSTemplateFormatVersion, sonar.lf.logoWidthPx=105, sonar.javascript.ignoreHeaderComments=true, sonar.dbcleaner.daysBeforeDeletingClosedIssues=30, sonar.java.enablePreview=False, sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth=4, sonar.lf.gravatarServerUrl=https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&d=identicon, sonar.core.serverBaseURL=https://sonarcloud.io, publish_data_events=true, sonar.branch.longLivedBranches.regex=dev|staging|release, sonar.objc.file.suffixes=.m, sonar.autoscan.enabled=false, sonar.text.inclusions=/*.sh,/.bash,**/.zsh,/*.ksh,/.ps1,**/.properties,/*.conf,/.pem,**/.config,.env,.aws/config, sonar.ruby.coverage.reportPaths=coverage/.resultset.json, sonar.cobol.sourceFormat=fixed, rp.entitlements.api.enabled=true, sonar.sensor.cache.baseUrl=https://api.sonarcloud.io/analysis, sonar.qualityProfiles.allowDisableInheritedRules=true, sonaranalyzer-cs.staticResourceName=SonarAnalyzer-9.32.0.97167.zip, sonar.notifications.runningDelayBeforeReportingStatus=600, sonar.cpd.cobol.ignoreLiteral=true, sonar.jsp.file.suffixes=.jsp,.jspf,.jspx, sonar.pli.ignoreHeaderComments=true, sonar.javascript.maxFileSize=1000, sonaranalyzer-cs.nuget.packageId=SonarAnalyzer.CSharp, sonar.javascript.environments=amd,applescript,atomtest,browser,commonjs,embertest,greasemonkey,jasmine,jest,jquery,meteor,mocha,mongo,nashorn,node,phantomjs,prototypejs,protractor,qunit,serviceworker,shared-node-browser,shelljs,webextensions,worker, sonar.authenticator.downcase=false, sonar.scm.disabled=false, sonar.ruby.exclusions=/vendor/, sonar.dart.file.suffixes=.dart, sonar.vbnet.file.suffixes=.vb, sonar.maintenance_mode.start_date=2023-09-28T09:10:00:00.000+01:00, sonaranalyzer-cs.analyzerId=SonarAnalyzer.CSharp, sonar.sensor.cache.project.enable=true, sonar.rpg.file.suffixes=.rpg,.rpgle,.sqlrpgle,.RPG,.RPGLE,.SQLRPGLE, sonar.core.id=1BD809FA-AWHW8ct9-T_TB3XqouNu, baseDir=/home/lohanyan/work/indra, sonar.cobol.adaprep.activation=false, sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog, sonar.global.exclusions=**/build-wrapper-dump.json, sonar.organizations.anyoneCanCreate=true, sonar.cfamily.ignoreHeaderComments=true, sonar.technicalDebt.ratingGrid=0.05,0.1,0.2,0.5, sonar.technicalDebt.developmentCost=30, sonar.lf.enableGravatar=true, sonar.docker.activate=true, sonar.python.file.suffixes=py, sonaranalyzer-cs.pluginVersion=9.32.0.97167, sonaranalyzer.security.cs.staticResourceName=SonarAnalyzer.Security-10.8.0.33361.zip, sonar.cs.file.suffixes=.cs,.razor, sonar.plsql.file.suffixes=sql,tab,pkb, sonaranalyzer.security.cs.ruleNamespace=SonarAnalyzer.Security, sonar.azureresourcemanager.file.suffixes=.bicep, sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue, sonar.cpd.abap.minimumLines=20, sonar.cobol.tab.width=8, sonar.maintenance_mode.message=SonarCloud will undergo maintenance on Thursday, September 28th.
Automatic Analysis will not be available between 07:00 CET and 09:00 CET, sonar.text.inclusions.activate=true, sonaranalyzer-vbnet.staticResourceName=SonarAnalyzer-9.32.0.97167.zip, sonar.vbnet.analyzeGeneratedCode=false, sonar.pli.file.suffixes=.pli, sonar.java.file.suffixes=.java,.jav, sonar.kotlin.file.suffixes=.kt,.kts, sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc, sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config, sonar.dbcleaner.weeksBeforeDeletingAllSnapshots=260, sonaranalyzer-vbnet.pluginKey=vbnet, sonar.maintenance_mode.link=SonarCloud: Autoscan maintenance September 28th, 07:00 and 09:00 CET, sonar.azureresourcemanager.activate=true, sonar.java.jvmframeworkconfig.activate=true, sonar.maxLinesOfCodePerFile=2000000, sonar.tsql.file.suffixes=.tsql, sonar.core.startTime=2024-10-31T09:52:22+0100}
activeRules: [425 cpp, 24 css, 213 python, 189 c, 28 scala, 109 kotlin, 29 rpg, 11 pythonbugs, 14 pli, 55 tsql, 90 secrets, 259 javascript, 38 apex, 130 plsql, 28 ruby, 11 jcl, 453 java, 71 cobol, 45 Web, 14 xml, 155 php, 6 javabugs, 258 typescript, 61 abap]
inputFiles: [
]
]

No file to analyze

Can someone please help to resolve the issue?

File org.sonarlint.eclipse.ui.prefs contains:
eclipse.preferences.version=1
hideSonarLintVersionHintDate=01.11.2024
rulesConfig={}
sonarLintVersion=10.8.0.82289

  • Operating system: Windows 11 / WSL2 Ubuntu
  • SonarLint plugin version: 10.8.0.82289
  • Programming language you’re coding in: C/C++
  • Is connected mode used:
    • Connected to SonarCloud:

Hey @levonohanyan,

thanks for reaching out. This issue is known and I’ve tackled a TICKET already that should be released with the upcoming release.

You can validate if it fixes your problem by leveraging a SonarLint for Eclipse Dogfooding build by installing it directly from our Dogfooding Update Site.

If it doesn’t work, please let me know as I have no idea about WSL and how it works or would affect SonarLint.

Best,
Tobias

Hi Tobias,
Thank you for reaponce. I do not have permission to link provided:

**This XML file does not appear to have any style information associated with it. The document tree is shown below.**
**<Error>**
**<Code>AccessDenied</Code>**
**<Message>Access Denied</Message>**
**<RequestId>H88ER4FPZFYPWXFW</RequestId>**
**<HostId>Uq+Q/naibOh3pXN5dgRq3Oluddtm3lCMaF2g81b8WKtZ4P4WBVEfwFZCVRUR0DyHSWFPoii56KqBDHHrrAIBGw==</HostId>**
**</Error>**

Regards,
Levon

Hi @levonohanyan,

the link is not readable, just paste it into the Eclipse Install New Software… dialog.
You have to uninstall the currently installed version of SonarLint for Eclipse before.

Best,
Tobias

Hi Tobias,

That works for me as expected! Thank you.
Also, the version 9.3.0.81553 downloaded and installed locally (from here) seems works as well.

Regards,
Levon

1 Like

Hi @levonohanyan,

great to hear that. Just to keep in mind, this old version will not be maintained and I advise you to update to the next version as soon it is released to have the latest fixes in :smile:

I will try to ping you once the new version is released but if I forget, please monitor our forum or our GitHub release page directly as it will be updated first. Once it is on GitHub it is also on our Eclipse Update Site and therefore updated in the marketplace.

Best,
Tobias

1 Like

Hi @levonohanyan,

the new version of SonarLint for Eclipse 10.9 was just released containing the fix for your problem.

Best,
Tobias

Will update to new version soon! Will let you know if will face any issues.
Thank you!
Levon