-
Notifications
You must be signed in to change notification settings - Fork 121
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] Feature Request (Remove Crate-Dependency) #285
Comments
I've personally not used The given hadolint example is hacking in a binary download via Other options: It'd be nice if there was a |
@scop since you created the hook, any thoughts on this? |
https://github.com/shellcheck-py/shellcheck-py is a similar setup.py based approach, better in the sense that it contains some verification of downloads. If this was my project, I'd personally probably stick with the source based build in this repo to serve audiences who rather don't use binaries from "random" sources, and a binary based one could be hosted in another repo (like shellcheck vs shellcheck-py, ditto hadolint/-py) by whoever is interested. Granted, the binaries here or in the mentioned projects aren't really that "random" but shipped in the respective author repos. |
I hadn't considered the idea of having a dedicated repo for alternative approaches! The main annoyance is keeping the version up-to-date (since |
One can also have multiple hooks defined in the same |
One thing to notice with a hypothetical setup like this, assuming binaries will be made available only for tagged releases: then a binary based hook would also work only with user configs with their |
No reason you can't have both hooks. One will be a Python one and one will be a crate hook. |
Hadn't realized users can opt-in to each hook within the file separately. That sounds like the way to go |
Any preference on naming convention? Or would someone more invested be interested in writing it, since I'd just be writing it blind... |
I won't have time to look into this until about next weekend/next week, but if nobody beats me to it, I think I can have a quick look. I think I'd
|
I really like this project and would like to include it as a pre-commit hook, but asking all my git repo to install Rust for the pre-commit hook is a bit much. As such, would it be possible to wrap the binary in a setup.py like is done by CircleCI-Py and such https://github.com/AleksaC/hadolint-py/blob/main/setup.py . That way it would not need any additional pre-reqs besides the ones for pre-commit.
The text was updated successfully, but these errors were encountered: