Skip to main content

Pylint

note

This is BETA. The behavior of this tool might change.

Supported VersionLanguageWebsite
2.9.3Pythonhttps://pylint.pycqa.org

Pylint is a Python static code analysis tool which looks for programming errors, helps to enforce a coding standard, sniffs for code smells and offers simple refactoring suggestions.

Getting Started#

To start using Pylint, enable it in your repository settings.

To customize Pylint, put a .pylintrc file in your repository.

If you don't have .pylintrc file, you can make it by executing the command below.

pylint --generate-rcfile > .pylintrc

Configuration#

You can customize the analysis via sider.yml:

linter:  pylint:    target:      - "./**/*test.py"    rcfile: ./folder/.pylintrc    errors-only: true    ignore:      - bad1.py      - bad2.py
NameTypeDefault
targetstring, string[]**/*.{py}
rcfilestring-
errors-onlyboolean-
ignorestring, string[]-

target#

This option allows you to specify files or directories to analyze via Pylint. Glob format is also available. If you specify multiple targets, configure as follows:

linter:  pylint:    target:      - "./**/*test.py"

rcfile#

This option allows you to specify a configuration file you want.

linter:  pylint:    rcfile: ./folder/.pylintrc

errors-only#

This option allows you to show only Pylint's error messages.

linter:  pylint:    errors-only: true

ignore#

This option allows you to exclude files from analysis. The files should be base names, not paths. If you specify multiple targets, configure as follows:

linter:  pylint:    ignore:      - bad1.py      - bad2.py