Skip to main content

Yet Another Linter Aggregator

Project description

build coveralls codecov codacy codeclimate sonarcloud issue_time

YALA combines many linters to improve the quality of your code. Other projects may come to your mind, but does anyone have all the features below?

Works with latest linters

Yala uses linters’ outputs and doesn’t break on API changes.

Same defaults

No changes to linters’ default configuration.

Easy to configure

Set any command-line option for any linter (even pylint!) in one INI file: setup.cfg.

Language-agnostic

Add any linter to any language.

Extensible

Just a few lines do add your preferred linter.

Fast

Run linters in parallel and sort output by filename and line number.

Current Status

For now, there are some Python linters available: isort, Pylint, Pycodestyle, Pydocstyle, Pyflakes and Radon (cyclomatic complexity and maintainability index).

Install

Requires Python >= 3.6.

sudo pip3.6 install --upgrade yala

If you are willing to hack yala’s code, run the command below in this README’s folder:

sudo pip3.6 install -e .[dev]

Usage

Just call yala followed by the files and/or folders to lint.

Linters’ options

You can configure the linters as explained in their docs (e.g. isort section in setup.cfg). To change the command line options for a linter, create a setup.cfg file in the same folder you run yala from. The default configuration is in the file yala/setup.cfg that you can copy and customize (you can remove unchanged lines). For example, to output grades C and lower for Radon Maintainability Index (default is D and lower), add the following to setup.cfg:

[yala]
radon mi args = --min C
pylint args = --disable=TODO

Besides “radon mi”, it’s possible to define cli options for “isort”, “pycodestyle”, “pydocstyle”, “pyflakes”, “pylint” and “radon cc” (the names are exactly as they are called in command line). Of course, you can still use other means provided by each linter (e.g. “isort” section).

Adding a linter

Check the file yala/linters.py and feel free to ask for help.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yala-1.3.3.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

yala-1.3.3-py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page