-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use pre-commit to automate installation and management of all pre-commit hooks #265
Comments
Good idea, I though it's was already used! And use pre-commit.ci to run hooks on PR? |
Definitely: I'd need to check if that works with our hooks but it looks promising! |
We've had very good experiences with pre-commit (still happily using https://github.com/pre-commit/action) |
Thank you for submitting your proposal to the 2024 QGIS Grant Programme. The 2 week discussion period starts today. At the end of the discussion, the proposal author has to provide a 3-line pitch of their proposal for the voter information material. (For an example from last year check qgis/PSC#58 (comment)) |
QGIS Enhancement: Use pre-commit to automate the installation and management of all pre-commit hooks
Date 2023/04/05
Author Alessandro Pasotti (@elpaso)
Contact elpaso at itopen dot it
maintainer @elpaso
Version QGIS 3.34
Summary
QGIS is currently using a set of pre-commit hooks to run scripts that manage the source code (format, checks etc.) before each commit.
Hooks must be installed manually which is not ideal.
Proposed Solution
Switch to https://pre-commit.com/ to manage our pre-commit hooks, this framework provides automated installation and configuration of the hooks, it has also a set of pre-defined hooks ready to use https://pre-commit.com/hooks.html
To install the hooks a user will just run pre-commit install to install pre-commit into the git hooks. pre-commit will now run on every commit. Every time you clone a project using pre-commit running pre-commit install should always be the first thing you do.
GDAL is successfully using this system.
Affected Files
Current pre-hook scripts.
Performance Implications
None
Backwards Compatibility
None
Votes
(required)
The text was updated successfully, but these errors were encountered: