Sonarqube75 - update python rules with new pylint rules

python

(Morten Bjoernsvik) #1

I found some unknown pylint rules when testing latest pylint (prerelease) on latest sonar-scanner:
My results was also messed up due to testing with a clean .pylintrc

sonar-scanner.bat --version
INFO: Scanner configuration file: D:\dist\sonar-scanner-3.3.0.1492-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 10 10.0 amd64
INFO: Sensor PylintSensor [python]
WARN: Pylint rule 'C0201' is unknown in Sonar
WARN: Pylint rule 'C0414' is unknown in Sonar
WARN: Pylint rule 'R1716' is unknown in Sonar
WARN: Pylint rule 'W0706' is unknown in Sonar
WARN: Pylint rule 'W1203' is unknown in Sonar
WARN: Pylint rule 'W1308' is unknown in Sonar

You can install the latest pylint by:

pip install pylint astroid --pre -U
Requirement already up-to-date: pylint in d:\dev\sensiotools\lib\site-packages (2.3.0.dev0)
Requirement already up-to-date: astroid in d:\dev\sensiotools\lib\site-packages (2.2.0.dev0)
Requirement already satisfied, skipping upgrade: mccabe in d:\dev\sensiotools\lib\site-packages (from pylint) (0.6.1)
Requirement already satisfied, skipping upgrade: colorama; sys_platform == "win32" in d:\dev\sensiotools\lib\site-packages (from pylint) (0.4.0)
Requirement already satisfied, skipping upgrade: isort>=4.2.5 in d:\dev\sensiotools\lib\site-packages (from pylint) (4.3.4)
Requirement already satisfied, skipping upgrade: wrapt in d:\dev\sensiotools\lib\site-packages (from astroid) (1.11.1)
Requirement already satisfied, skipping upgrade: six in d:\dev\sensiotools\lib\site-packages (from astroid) (1.11.0)
Requirement already satisfied, skipping upgrade: lazy-object-proxy in d:\dev\sensiotools\lib\site-packages (from astroid) (1.3.1)

(Alban Auzeill) #2

Morten,
I created an improvement ticket SONARPY-303. Thanks for reporting it, and a little bird told me that it could be fixed in the next SonarPython version at the end of this week :shushing_face:.
Alban