Page MenuHomePhabricator

Add pylint checking
Closed, DeclinedPublic

Description

pylint is more detailed than flake8, identifying more python stylistic issues.

As we have addressed the issues identified by flakes, it would be good to progress onto fixing pylint issues.

Ideally we add a pre-code-review pylint check to jenkins. It appears to be quite simple to do, using the jenkins plugin violations.

http://www.alexconrad.org/2011/10/jenkins-and-python.html
http://chrigl.de/blogentries/integration-of-pylint-into-jenkins


Version: core-(2.0)
Severity: normal

Details

Reference
bz72697

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:45 AM
bzimport added a project: Pywikibot-tests.
bzimport set Reference to bz72697.
bzimport added a subscriber: Unknown Object (????).

I guess you can start by adding a "pylint" environment in the tox.ini file, then tweak the Jenkins/Zuul configuration file in integration/config.git to create a job that executes pylint and triggers it on the pywikibot repositories.

A tutorial is:

https://www.mediawiki.org/wiki/Continuous_integration/Tutorials/Test_your_python

That would be a good first step.

On http://chrigl.de/blogentries/integration-of-pylint-into-jenkins it highlights the use of the Violation plugins which is able to parse pylint output and craft a nice report. The JJB job template for tox does not run it though since it is used to trigger various environment. We might need a dedicated job template.

Some examples of what it would have been picked up:

T75628 T75027 T75025 T75026 T75019 T75023 T75017

However pylint doesnt pick up this: (as it cant determine what type self.site is):

T78107

Xqt triaged this task as Lowest priority.Jan 13 2019, 1:33 PM
Xqt subscribed.
This comment was removed by Xqt.

Feel free to reopen and implement it. flake8 looks appropriate for me.