A meta linter to run all linters
Project description
Lint-All
Lint-All is a meta-linter tailored for software development with git. It can run any number of linters that adhere to a certain standard format in their output. Lint-All is designed to compare the current branch to the main branch and output lint comments only for lines that were changed in the current branch with respect to the main branch. This behavior can be controlled through flags to check all files or focus on a specific sub-folder.
Features
- Run multiple linters.
- Support for many standard linters: pylint, cpplint, mypy, golint, and more.
- Only output lint comments for lines changed in the current branch compared to the main branch.
- Configurable through a YAML file.
- Control which linters to run and their configurations.
- Supports excluding paths and ignoring specific issues.
- Option to include old issues in the report.
Installation
pip install lint-all
Usage
Lint-All is controlled via a YAML configuration file that specifies the linters to be run. An example configuration file can be downloaded from the repository (all_linters.yaml) and adjusted as needed.
Basic Usage
lint_all --linters-config path/to/your_linters_config.yaml
Command Line Arguments
--base-path
: The base path to run linters from (recursively). The default is the current directory.--ref-branch
: Reference branch against which the current branch is compared. Default isorigin/main
.--check-all-files
: Run linters on all files. If false, runs only on diff fromref_branch
.--report-old-issues
: Include old issues in the report. If not set, ignores old issues.--ignore-uncommitted-or-staged
: Ignore files with uncommitted or staged changes.--use-git-lfs
: Pull LFS files from git. Requires installinggit-lfs
.--linters-config
: YAML configuration of all linters to be used.
Configuration
The configuration file is a YAML file that specifies the linters to be run and their configurations. Here is an example of what the configuration file might look like:
- name: pylint
cmd: ["pylint"]
extensions: [".py"]
use_stderr: false
run_by_default: true
ignored_issues:
- "C0103"
- "R0913"
excluded_paths:
- "tests/"
- "docs/"
Every linter's 'run_by_default' can be overridden in commandline, e.g.:
lint_all --linters-config path/to/your_linters_config.yaml --nopylint
License
This project is open-sourced at my request under Apache license by Resonai Ltd even though I no longer work there, because they are nice, generous people.
Author
Shir Granot Peled - Linkedin profile, Blog
Enjoy using Lint-All for cleaner and more maintainable code!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lint_all-0.1.2.tar.gz
.
File metadata
- Download URL: lint_all-0.1.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dc06cba17b499bcf422fee03a869d95cfa86331b5619bfbe8964e71f8b4340 |
|
MD5 | a569df4de657052bad5c6c7ac72301c6 |
|
BLAKE2b-256 | ddc092f6cf43b8540756f15837d8f90dbc42ed917c1a293e474ae57bac301335 |
File details
Details for the file lint_all-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: lint_all-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1be7f6a4b3da9933d13218946994824a58c23553fd125ffd759dbd86fbc677dd |
|
MD5 | 47f15d61ee4d9b78b23cc597f1a3a512 |
|
BLAKE2b-256 | 5ae1a2fc3384af171cd270c68fb195a0d412a1241c9e76601522ea0a4e200755 |