lintrunner-adapters


Namelintrunner-adapters JSON
Version 0.12.4 PyPI version JSON
download
home_pagehttps://github.com/justinchuby/lintrunner-adapters
SummaryAdapters and tools for lintrunner
upload_time2024-06-27 22:56:47
maintainerNone
docs_urlNone
authorJustin Chu
requires_python<4.0,>=3.7
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": 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/66/e8/8b7e62d42811f5c4739ef303ae51692b4eaa95bb506f43ce0df902153b97/lintrunner_adapters-0.12.4.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.4",
    "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": "adaf1b25ba93d3fd76238b9383dbcad6523321822812745fd5f51e6126fb3e75",
                "md5": "d7fbd903736002147e6d99ecc01c6afc",
                "sha256": "65c2e6d249d961ba64e63d06ae03f5506a519d5f024d76e6693d923ceff60f5a"
            },
            "downloads": -1,
            "filename": "lintrunner_adapters-0.12.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7fbd903736002147e6d99ecc01c6afc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 62355,
            "upload_time": "2024-06-27T22:56:45",
            "upload_time_iso_8601": "2024-06-27T22:56:45.507488Z",
            "url": "https://files.pythonhosted.org/packages/ad/af/1b25ba93d3fd76238b9383dbcad6523321822812745fd5f51e6126fb3e75/lintrunner_adapters-0.12.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66e88b7e62d42811f5c4739ef303ae51692b4eaa95bb506f43ce0df902153b97",
                "md5": "77d1ed77efed6cdbd4239cc00e2eb455",
                "sha256": "76d4f18e85f2b02990e8317d2d2586a3780e98c3c36bdcc6d03cef5f33e25424"
            },
            "downloads": -1,
            "filename": "lintrunner_adapters-0.12.4.tar.gz",
            "has_sig": false,
            "md5_digest": "77d1ed77efed6cdbd4239cc00e2eb455",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 29062,
            "upload_time": "2024-06-27T22:56:47",
            "upload_time_iso_8601": "2024-06-27T22:56:47.376658Z",
            "url": "https://files.pythonhosted.org/packages/66/e8/8b7e62d42811f5c4739ef303ae51692b4eaa95bb506f43ce0df902153b97/lintrunner_adapters-0.12.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 22:56:47",
    "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: 3.64816s