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 and Rust linters and formatters like flake8, pylint, mypy, black, ruff(with auto-fix support), rustfmt, clippy 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.10.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

lintrunner_adapters-0.10.0-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lintrunner_adapters-0.10.0.tar.gz
Algorithm Hash digest
SHA256 3e916c1d27cea3a8fd9d880182c028a73aa9b0eefe25f89d09745de0645e2d9a
MD5 6cfbe0c60ad84c202574864e363236a6
BLAKE2b-256 171ac4c1be97d1b5e48123b2608b564ef7a9387cee1fc07fe21106a5896761a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lintrunner_adapters-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1370ed6363cee2a91d3feb016c9644ae10a27bc1a179f5a4f7a13fb9a09a400d
MD5 1bfc73896825968cff28c876e734a179
BLAKE2b-256 2c671b262c1f93c30ff014c085508446d785896ee838519d882fff9e5bf815bb

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