Adapters and tools for lintrunner
Project description
lintrunner-adapters
Adapters and tools for lintrunner.
lintrunner-adapters
currently supports popular Python / Rust / C++ linters and formatters like flake8
, pylint
, mypy
, black
, ruff
(with auto-fix support), rustfmt
, clippy
, clang-format
and many more - and the list is growing. Contribution is welcome!
To see the list of supported linters and formatters, run lintrunner_adapters run
.
Install
pip install lintrunner-adapters
Usage
Usage: python -m lintrunner_adapters [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
run Run an adapter.
to-sarif Convert the output of lintrunner json (INPUT) to SARIF (OUTPUT).
Use lintrunner_adapters run
to see a list of adapters available.
GitHub action
https://github.com/justinchuby/lintrunner-action
How to
Use lintrunner_adapters
with lintrunner
in your project
Refer to the .lintrunner.toml
config file in this repo and example configs for each adapter under examples/adapters
.
Write lint config in .lintrunner.toml
See https://docs.rs/lintrunner/latest/lintrunner/lint_config/struct.LintConfig.html.
Create a new adapter
Use lintrunner_adapters/adapters/pylint_linter.py
as an example.
Run lintrunner in CI and get Github code scanning messages in your PRs
Option 1
Use a GitHub Action: lintrunner-action
Option 2
Run it directly in the workflow. See .github/workflows/ci.yml
.
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
Hashes for lintrunner_adapters-0.12.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e93f21735674851dae714e3f04bc7c661cef6295a71bb1e80cdd6ab86b9cb2b |
|
MD5 | 66cfe4d4fc4d7cff7bac8e5c6a9e4c67 |
|
BLAKE2b-256 | ac88db1e42d18467de7779d11b26f6af3c94635ce71776a90f8641023e11ac95 |
Hashes for lintrunner_adapters-0.12.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 148437d0783ec61eb019ff1c3982520fb4932f4fda899c74ffc91d9cdf5f69a6 |
|
MD5 | 55b56d2ea55d942df9e679e879d50b2e |
|
BLAKE2b-256 | 38a120e6e00e676230d50aa34cdbba7a12f9794ec9e8ea55fe8833874217a0df |