SonarLint won't analyze any files on VSCode

Please provide

  • Operating system: Linux CentOS 7
  • SonarLint plugin version: 3.12.1=0
  • Programming language you’re coding in: C, C++, Python
  • Is connected mode used: Yes (attempted, at least)
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 10.0

And a thorough description of the problem / question:

So I’ve installed SonarLint on my VSCode, but the plugin is unable to do literally anything. No analysis, no error messages - nothing. The default rules load in the sidebar, but nothing is ever actually analyzed. I’ve tried to set up connected mode, and link it to my compilation database, but I don’t think I’m even getting that far because it won’t analyze my python files (which I believe wouldn’t need any sort of compilation database?). I haven’t attached any screenshots because I don’t even see how they could convey useful information, but I’m happy to add more if anyone has any ideas. Help would be greatly appreciated - thanks!

Hi there @mloughnane , welcome to Sonar Community! :wave: :sonar:

it won’t analyze my python files (which I believe wouldn’t need any sort of compilation database?).

You are absolutely right in thinking that. If you installed SonarLint, as soon as you open a Python file, analysis should be triggered and you should see the results (of course if you have any issues in the file).

In order to understand why that is not happening for you, we would need SonarLint logs. You will be able to fetch them by following the instructions here. Once you have it, please upload it here for us to have a look.

In addition, it would help if you could provide a reproducible Python code snippet where you expect to see the findings but you don’t.

Thanks in advance,
Sophio