Enable Sonarlint analysis of Python files in CLion

I have Sonarlint plugin (version 4.16.0.31683) installed in my CLion IDE. The project I work on has both C++/Python code. Sonarlint works fine for C++ code. But it does not seem to analyze Python code. When I try to run analysis on a Python file, the log shows following output:

File 'my_python_file.py' excluded: PyFile:my_python_file.py not an OCPsiFile
Trigger: ACTION
[Action] 0 file(s) submitted

I tried both with binding and without binding to my SonarQube server.
How do I make it work?

Hello @asuzit, welcome to the SonarSource community!!
SonarLint for CLion does not support (yet) Python analysis, although this is in our radar. Do you frequently open / edit Python code in CLion? And in case, what do you use Python for (scripting?).
I converted your request into a “Suggest new features” topic, so that other users can comment or add their vote; we normally prioritize next features development also based on the interest among our community users.

Thanks for the quick response.
I do frequently open/edit Python code in CLion. Python is integrated in my application for scripting purposes.
Even some of the features in the application are implemented in Python.
So my team is definitely interested in this feature.

2 Likes