Programming language you’re coding in: python 3.11
Is connected mode used:
Connected to SonarQube (optional)
I am trying to use SonarLint for Python Django in VS Code. I am unable to see suggestions from SonarLint in Python code in the editor, nor in the ‘Problems’ section of the Output.
In the Output, I am getting:
‘No problems have been detected in the workspace.’
It does not scan the overall code or show anything new in VS Code. This issue still persists whether I use SonarQube or not.
Thanks for raising the topic. I would like to clarify a couple of things
‘No problems have been detected in the workspace.’ message does not sound like it’s coming from SonarLint. Would you be able to share SonarLint logs? You can find the instructions on how to get them here.
Do you see issues being raised on SonarQube for the same file? What is the rule that is violated? (it should look something like python:Sxxx
It would be ideal if you could share with us an example snippet where you expect to see an issue but don’t.
When I opened serializers.py, I was able to see the logs, but I was unable to see the problems marked in ‘PROBLEMS’ or in the editor.
I wasn’t able to see SonarQube issues either; it was all empty.
Analysis detected 16 issues and 0 Security Hotspots in 5811ms
It means the analysis was completed successfully, and problems should appear in the editor and in the PROBLEMS tab.
Would you be able to share a screenshot showing that this is not the case? Something that might be happening is either
You have applied some filters to the PROBLEMS view that hides SonarLint issues
You have enabled SonarLint focus: New Code option and will only be seeing issues on new code. You will be able to check the SonarLint focus value by looking at the VSCode status bar, or going checking the value of the following user setting - sonarlint.focusOnNewCode
Based on the information you provided, SonarLint analysis detects 18 issues in your file, but the PROBLEMS view is not showing any of them. Could it be that you have tweaked some VSCode settings related to PROBLEMS display? Such as problems.visibility or outline.problems.enabled
Also, we just released SonarLint v4.8 yesterday, maybe updating will help.
Sorry I have not really been able to help
Best,
Sophio
It seems that the issue storage SonarLint is using is corrupted. Could you try to close VSCode, remove all the /home/rhythmflow/.sonarlint/known-findings-store-* folders and restart?