How to respond to warning 'sonar.python.version.'

Hi there!

I’m getting an alarm in my project summary and would like to know how to set it.(Used SONARCLOUD)

  • Alert:
    !! Last analysis has warnings
    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”

  • ALM used (GitHub)

  • Languages of the repository (GO)


This is, as you say, just a warning. It’s letting you know that you’ll get a more thorough/accurate analysis if you set the sonar.python.version property in your analysis parameters. More in the docs.