Skip to main content

Adapters and tools for lintrunner

Project description

lintrunner-adapters

CI PyPI version

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


Download files

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

Source Distribution

lintrunner_adapters-0.12.4.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

lintrunner_adapters-0.12.4-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file lintrunner_adapters-0.12.4.tar.gz.

File metadata

  • Download URL: lintrunner_adapters-0.12.4.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for lintrunner_adapters-0.12.4.tar.gz
Algorithm Hash digest
SHA256 76d4f18e85f2b02990e8317d2d2586a3780e98c3c36bdcc6d03cef5f33e25424
MD5 77d1ed77efed6cdbd4239cc00e2eb455
BLAKE2b-256 66e88b7e62d42811f5c4739ef303ae51692b4eaa95bb506f43ce0df902153b97

See more details on using hashes here.

File details

Details for the file lintrunner_adapters-0.12.4-py3-none-any.whl.

File metadata

File hashes

Hashes for lintrunner_adapters-0.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 65c2e6d249d961ba64e63d06ae03f5506a519d5f024d76e6693d923ceff60f5a
MD5 d7fbd903736002147e6d99ecc01c6afc
BLAKE2b-256 adaf1b25ba93d3fd76238b9383dbcad6523321822812745fd5f51e6126fb3e75

See more details on using hashes here.

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