Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC consider pre-commit for linters #20604

Open
adrinjalali opened this issue Dec 6, 2024 · 0 comments
Open

RFC consider pre-commit for linters #20604

adrinjalali opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@adrinjalali
Copy link
Contributor

adrinjalali commented Dec 6, 2024

Would you consider adding pre-commit config to the repo? This wouldn't mean people have to enable it, but would make it possible for people who are happy to use it, to enable it and have a nicer time dealing with linting issues.

It could be a variation of this:

repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
    -   id: check-yaml
    -   id: end-of-file-fixer
    -   id: trailing-whitespace
-   repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.8.0
    hooks:
    -   id: ruff
        args: ["--fix", "--output-format=full", "--select=I"]
    -   id: ruff-format

To enable, the user would do:

pip install pre-commit
pre-commit install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants