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

pre-commit hook #28

Open
rohaquinlop opened this issue Mar 9, 2024 · 2 comments
Open

pre-commit hook #28

rohaquinlop opened this issue Mar 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rohaquinlop
Copy link
Owner

Considering Reddit comment:

image

pre-commit hook
ruff pre-commit hook

@rohaquinlop rohaquinlop added the enhancement New feature or request label Mar 10, 2024
@jmlemetayer
Copy link

I have checked how it is done by ruff (https://github.com/astral-sh/ruff-pre-commit).

  • Pre-commit accept every url:

    As long as your git repo is an installable package (gem, npm, pypi, etc.)

  • Using the project url (https://github.com/astral-sh/ruff.git) can work but:
    • You are rebuilding the rust project
    • You must have a rust toolchain installed
    • You are not using the pre-compiled pypi package
  • The pre-commit project (https://github.com/astral-sh/ruff-pre-commit) is just a simple python package that can be installed directly:
    • It requires the original pypi package.
    • It also have the .pre-commit-hooks.yaml file.
  • A github action is used to generate a new PR (and a new tag) when the pypi package as been updated

@rohaquinlop
Copy link
Owner Author

@jmlemetayer thank you so much for this investigation!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants