Page MenuHomePhabricator

Add pylint checking
Open, LowestPublic

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 (????).
jayvdb created this task.Oct 29 2014, 8:01 PM

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.

jayvdb moved this task from Backlog to Framework on the Pywikibot-tests board.Nov 29 2014, 4:57 PM

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 19 2015, 1:20 PM
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptFeb 20 2016, 4:07 PM
hashar removed a subscriber: hashar.Mar 9 2017, 10:33 PM
Xqt triaged this task as Lowest priority.Jan 13 2019, 1:33 PM
Xqt added a subscriber: Xqt.
This comment was removed by Xqt.