Giter Site home page Giter Site logo

justinchuby / lintrunner-adapters Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 238 KB

Adapters and tools for lintrunner

Home Page: https://pypi.org/project/lintrunner-adapters

License: Other

Python 100.00%
ci linting sarif lintrunner code-scanning clippy flake8 lint linter python

lintrunner-adapters's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.