Sonar Python Version warning

Hey, I am getting a warning in my analysis:
Your code is analyzed as compatible with python 2 and 3 by default. This will prevent the detection of issues specific to python 2 or python 3. You can get a more precise analysis by setting a python version in your configuration via the parameter “sonar.python.version”

I have already checked the docs as well as this topic How do you set Python version in Sonarcloud UI?

However, the two solutions posted do not seem to work for me.

I have tried:
sonar.python.version=2.7
sonar.python.version=3.6
sonar.python.version=2.7, 3.6
in both .sonarcloud.properties and sonar-project.properties

I guess I should also mention I am making the change in a branch and opened a PR to master, analysis is being done on the PR. Perhaps it needs to be merged before Sonarcloud picks it up?

Hey there.

Thanks for the feedback. We agree that this should be able to be set in .sonarcloud.properties, and a fix should be forthcoming (I’m not sure what’s holding it up, to be honest). Let me check on that.

Hey @TDF37

This was deployed on production this morning. Give it a try!

Hey Colin, I can confirm it is working now. Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.