Sonarlint does not show issues vscode cpp project

We can see the bugs/code smells for the same code on sonar cloud but locally with sonarlint it’s still says [Info - 22:19:55.547] Found 0 issues
compile_commands.json had been successfully created and sonarlint is running on the connected mode with the paid sonar cloud project
Any idea please?

Hey there.

Are you passing your compile commands to sonarlint.pathToCompileCommands? (Docs)

C and C++ analysis specific requirements

To analyze C and C++ code, SonarLint requires compile commands json file:

        "sonarlint.pathToCompileCommands": "/home/yourname/repos/proj/compile_commands.json"

Note: if you are using Microsoft compiler, the environment should be ready to build the code. For example, by launching VS Code from your Visual Studio Command Prompt

Thanks for your reply!

The problem is - even the rule is activated in sonalint in the vscode, it’s not being applied on the non-compliant code

following is my code snippet, where the rule ‘extern “C”’ should not be used with namespaces (cpp:S3732) is already activated, I am expecting this to be anaysed by the sonarlint but it doesn’t complain - any idea please

extern “C” {
void Sys_Boot_RsetHndlr(void);

Hey there.

Putting rule activation aside, can you first confirm that you’re passing your compile commands to sonarlint.pathToCompileCommands?

Yes I am in the settings under Sonarlint: Path To Compile Commands