Sonarlint integration with sonarcloud in Visual studio

it is possible to connect and troubleshoot the issue

while binding the project i can see some logs where it tries to execute some rules . i think . below is the log

2-13T14:36:02+0100",“textRange”:{“startLine”:496,“endLine”:496,“startOffset”:38,“endOffset”:50},“flows”:,“ruleKey”:“csharpsquid:S2245"},{“key”:”“,“component”:”_aqari-cres:CRES.Business/Managers/MomraRealEstateManager.cs",“project”:"_aqari-cres",“securityCategory”:"weak

Hi

just to make more simple i have opened the same project in visual studio code and i am seeing warning from sonarlint. but when i opened the same project in visual studio those warning are not there .

Below is the snip from visual studio code

below is from visual studio

Hi Mansoor

Again you do not need to send us the logs for now unless there’s an error because there won’t be any info about .Net analysis there. The “Found 0 Issue(s)” message is expected in this case because -as you can see from the beginning of the log- it’s about the secrets analyzer. You will never see your issues in SonarLint output pane for .Net analysis. You should see your issues in the error list.

For the error list screenshot could you narrow the scope to the current file and also show “intellisense only” instead of “build only”? It seems like your Visual Studio not showing any intellisense errors, in the dummy code you sent there should be a squiggle under “trues” coming from Roslyn.

Also can you make sure that “Show error squiggles” is enabled under Tools → Options → Text Editor → General

this option is already enabled

below is the output

one more thing currently my ruleset in sonarlint setting is empty but i see it is reading rules from sonar cloud rules from beow path

image

[ThreadId 186] [SecretsAnalyzer] Analyzing C:\cres-service\Aqari.DeedText\DeedTextBuilder\DeedTextBuilder.cs
09:47:58:485 [ThreadId 186] Loaded settings from “C:\Users\masroora\AppData\Roaming\SonarLint for Visual Studio\Bindings\cres-service\secrets_settings.json”.
09:47:58:486 [ThreadId 186] [RuleSettings] Using connected mode settings. User-specified settings in settings.json will be ignored.
09:47:58:489 [ThreadId 186] [SecretsAnalyzer] Finished analyzing C:\cres-service\Aqari.DeedText\DeedTextBuilder\DeedTextBuilder.cs, analysis time: 0.007s
09:47:58:489 [ThreadId 186] [SecretsAnalyzer] Found 0 issue(s) for C:\cres-service\Aqari.DeedText\DeedTextBuilder\DeedTextBuilder.cs

It’s empty by default and it’s ignored in connected mode anyway.

There are no issues from sonarlint and VS. If you disable sonarlint and open the same file do you see any issues in the error list?

I have the same issue in visual studio.

But i see the codesmells and bugs i sonarcloud.

is there any solution for it?

Hi @DivyaEaga,

Welcome to the community!

This thread is over 2mo old. Per the FAQ, we prefer you create a new thread in this case, with all your details.

 
Thx,
Ann