StyraInc / regal

Regal is a linter and language server for Rego, bringing your policy development experience to the next level!
https://docs.styra.com/regal
Apache License 2.0
251 stars 34 forks source link

Pinning the pre-commit hook version doesn't pin the regal version #1064

Open paddycarey opened 1 week ago

paddycarey commented 1 week ago

Hi, I'm not sure if this is by design or not, but we noticed today after the 0.26.0 release that a newer version of regal was being downloaded in our pre-commit hook than what we thought we had pinned (0.24.0).

It looks like the download script defaults to latest, is it somehow possible to pin the regal version along with the pre-commit hook?

Thanks!

paddycarey commented 1 week ago

ah, i just noticed in the docs

Downloads the latest regal binary from Github.

It'd be nice to be able to specify the version for the regal-download hook to avoid the need for a local Go toolchain.

anderseknert commented 1 week ago

Hey Paddy! And thanks for reporting that. Honestly I'm a bit rusty on how those hooks work, and that code was contributed by folks from the community who wanted them. If you have an idea for how to best update the scripts to allow versioning, I'd be grateful for a PR! If not, I can try to look into it sometime next week or so.