lintrunner-adapters


Namelintrunner-adapters JSON
Version 0.12.3 PyPI version JSON
download
home_pagehttps://github.com/justinchuby/lintrunner-adapters
SummaryAdapters and tools for lintrunner
upload_time2024-02-08 05:35:57
maintainer
docs_urlNone
authorJustin Chu
requires_python>=3.7,<4.0
licenseMIT
keywords lintrunner lint cli sarif linting ci linter flake8 clippy ruff rustfmt github-code-scanning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lintrunner-adapters

[![CI](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml/badge.svg)](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml)
[![PyPI version](https://badge.fury.io/py/lintrunner-adapters.svg)](https://badge.fury.io/py/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": "https://github.com/justinchuby/lintrunner-adapters",
    "name": "lintrunner-adapters",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "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/ac/88/db1e42d18467de7779d11b26f6af3c94635ce71776a90f8641023e11ac95/lintrunner_adapters-0.12.3.tar.gz",
    "platform": null,
    "description": "# lintrunner-adapters\n\n[![CI](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml/badge.svg)](https://github.com/justinchuby/lintrunner-adapters/actions/workflows/ci.yml)\n[![PyPI version](https://badge.fury.io/py/lintrunner-adapters.svg)](https://badge.fury.io/py/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.3",
    "project_urls": {
        "Homepage": "https://github.com/justinchuby/lintrunner-adapters",
        "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": "",
            "digests": {
                "blake2b_256": "38a120e6e00e676230d50aa34cdbba7a12f9794ec9e8ea55fe8833874217a0df",
                "md5": "55b56d2ea55d942df9e679e879d50b2e",
                "sha256": "148437d0783ec61eb019ff1c3982520fb4932f4fda899c74ffc91d9cdf5f69a6"
            },
            "downloads": -1,
            "filename": "lintrunner_adapters-0.12.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55b56d2ea55d942df9e679e879d50b2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 62342,
            "upload_time": "2024-02-08T05:35:55",
            "upload_time_iso_8601": "2024-02-08T05:35:55.987517Z",
            "url": "https://files.pythonhosted.org/packages/38/a1/20e6e00e676230d50aa34cdbba7a12f9794ec9e8ea55fe8833874217a0df/lintrunner_adapters-0.12.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac88db1e42d18467de7779d11b26f6af3c94635ce71776a90f8641023e11ac95",
                "md5": "66cfe4d4fc4d7cff7bac8e5c6a9e4c67",
                "sha256": "7e93f21735674851dae714e3f04bc7c661cef6295a71bb1e80cdd6ab86b9cb2b"
            },
            "downloads": -1,
            "filename": "lintrunner_adapters-0.12.3.tar.gz",
            "has_sig": false,
            "md5_digest": "66cfe4d4fc4d7cff7bac8e5c6a9e4c67",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 29064,
            "upload_time": "2024-02-08T05:35:57",
            "upload_time_iso_8601": "2024-02-08T05:35:57.935189Z",
            "url": "https://files.pythonhosted.org/packages/ac/88/db1e42d18467de7779d11b26f6af3c94635ce71776a90f8641023e11ac95/lintrunner_adapters-0.12.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 05:35:57",
    "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"
}
        
Elapsed time: 0.17581s