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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76d4f18e85f2b02990e8317d2d2586a3780e98c3c36bdcc6d03cef5f33e25424 |
|
MD5 | 77d1ed77efed6cdbd4239cc00e2eb455 |
|
BLAKE2b-256 | 66e88b7e62d42811f5c4739ef303ae51692b4eaa95bb506f43ce0df902153b97 |
Hashes for lintrunner_adapters-0.12.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c2e6d249d961ba64e63d06ae03f5506a519d5f024d76e6693d923ceff60f5a |
|
MD5 | d7fbd903736002147e6d99ecc01c6afc |
|
BLAKE2b-256 | adaf1b25ba93d3fd76238b9383dbcad6523321822812745fd5f51e6126fb3e75 |