# lintrunner-adapters
[](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml)
[](https://badge.fury.io/py/lintrunner-adapters)
[](https://pypistats.org/packages/lintrunner-adapters)
Adapters and tools for [lintrunner](https://github.com/suo/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
```sh
pip install lintrunner-adapters
```
## Usage
```text
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`](https://github.com/justinchuby/lintrunner-adapters/blob/main/.lintrunner.toml) config file in this repo and example configs for each adapter under [`examples/adapters`](https://github.com/justinchuby/lintrunner-adapters/tree/main/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`](https://github.com/justinchuby/lintrunner-adapters/blob/main/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](https://github.com/justinchuby/lintrunner-action)
#### Option 2
Run it directly in the workflow. See [`.github/workflows/ci.yml`](https://github.com/justinchuby/lintrunner-adapters/blob/main/.github/workflows/ci.yml).
Raw data
{
"_id": null,
"home_page": null,
"name": "lintrunner-adapters",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": "lintrunner, lint, cli, sarif, linting, ci, linter, flake8, clippy, ruff, rustfmt, github-code-scanning",
"author": "Justin Chu",
"author_email": "justinchu@microsoft.com",
"download_url": "https://files.pythonhosted.org/packages/70/8d/5ca420270e3ea136866de4138de254d6f25ce62aca1fb008e22609c7307b/lintrunner_adapters-0.12.6.tar.gz",
"platform": null,
"description": "# lintrunner-adapters\n\n[](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml)\n[](https://badge.fury.io/py/lintrunner-adapters)\n[](https://pypistats.org/packages/lintrunner-adapters)\n\nAdapters and tools for [lintrunner](https://github.com/suo/lintrunner).\n\n`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!\n\nTo see the list of supported linters and formatters, run `lintrunner_adapters run`.\n\n## Install\n\n```sh\npip install lintrunner-adapters\n```\n\n## Usage\n\n```text\nUsage: python -m lintrunner_adapters [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n run Run an adapter.\n to-sarif Convert the output of lintrunner json (INPUT) to SARIF (OUTPUT).\n```\n\nUse `lintrunner_adapters run` to see a list of adapters available.\n\n## GitHub action\n\nhttps://github.com/justinchuby/lintrunner-action\n\n## How to\n\n### Use `lintrunner_adapters` with `lintrunner` in your project\n\nRefer to the [`.lintrunner.toml`](https://github.com/justinchuby/lintrunner-adapters/blob/main/.lintrunner.toml) config file in this repo and example configs for each adapter under [`examples/adapters`](https://github.com/justinchuby/lintrunner-adapters/tree/main/examples/adapters).\n\n### Write lint config in `.lintrunner.toml`\n\nSee https://docs.rs/lintrunner/latest/lintrunner/lint_config/struct.LintConfig.html.\n\n### Create a new adapter\n\nUse [`lintrunner_adapters/adapters/pylint_linter.py`](https://github.com/justinchuby/lintrunner-adapters/blob/main/lintrunner_adapters/adapters/pylint_linter.py) as an example.\n\n### Run lintrunner in CI and get Github code scanning messages in your PRs\n\n#### Option 1\n\nUse a GitHub Action: [lintrunner-action](https://github.com/justinchuby/lintrunner-action)\n\n#### Option 2\n\nRun it directly in the workflow. See [`.github/workflows/ci.yml`](https://github.com/justinchuby/lintrunner-adapters/blob/main/.github/workflows/ci.yml).\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Adapters and tools for lintrunner",
"version": "0.12.6",
"project_urls": {
"Repository": "https://github.com/justinchuby/lintrunner-adapters"
},
"split_keywords": [
"lintrunner",
" lint",
" cli",
" sarif",
" linting",
" ci",
" linter",
" flake8",
" clippy",
" ruff",
" rustfmt",
" github-code-scanning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "091e9cf84b08943ef10caf667988e752f00602f6a7e17585fc7705b259fdcd28",
"md5": "a6a586435509d821b1ce90b2e9fc8497",
"sha256": "4bf129bb371380d7be9f8d3578c296d54fce7890e7ad15287a969e3e2d58d150"
},
"downloads": -1,
"filename": "lintrunner_adapters-0.12.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6a586435509d821b1ce90b2e9fc8497",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 62213,
"upload_time": "2025-07-25T23:26:39",
"upload_time_iso_8601": "2025-07-25T23:26:39.890826Z",
"url": "https://files.pythonhosted.org/packages/09/1e/9cf84b08943ef10caf667988e752f00602f6a7e17585fc7705b259fdcd28/lintrunner_adapters-0.12.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "708d5ca420270e3ea136866de4138de254d6f25ce62aca1fb008e22609c7307b",
"md5": "390ff54ab9a240c0c633f2a1ece366eb",
"sha256": "3ba6a449733d851dc73a7f28bbf7bd14c5e618a0bcd8c016c5f2b4c77e19c4ba"
},
"downloads": -1,
"filename": "lintrunner_adapters-0.12.6.tar.gz",
"has_sig": false,
"md5_digest": "390ff54ab9a240c0c633f2a1ece366eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 28126,
"upload_time": "2025-07-25T23:26:43",
"upload_time_iso_8601": "2025-07-25T23:26:43.440800Z",
"url": "https://files.pythonhosted.org/packages/70/8d/5ca420270e3ea136866de4138de254d6f25ce62aca1fb008e22609c7307b/lintrunner_adapters-0.12.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 23:26:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "justinchuby",
"github_project": "lintrunner-adapters",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "lintrunner-adapters"
}