3.1.11. Waf Tool Pylint

The tool is located in tools/waf-tools.

3.1.11.1. Tool Documentation

Implements a waf tool to run pylint.

Listing 3.14 shows how to use this tool.

Listing 3.14 f_pylint.py
1
2
3
4
5
6
7
8
9
def options(opt):
    opt.load("pylint")

def configure(conf):
    conf.load("pylint")

def build:
    files = bld.path.ant_glob("\*\*/\*.py")
    bld(features="pylint", files=files)
f_pylint.configure(conf)

configuration step of the pylint tool

  • searches for the program pylint

  • applies configured options

f_pylint.options(opt)

Passing options to pylint

f_pylint.process_pylint(self)

creates pylint tasks for each input file

class f_pylint.pylint(*args: Any, **kwargs: Any)

Bases: waflib.Task.

Class to implement running the pylint static analysis tool on Python files

color = 'BLUE'

color in which the command line is displayed in the terminal

Type

str

keyword()

displayed keyword when pylint is run