Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a more self-contained pre-commit hook (#155)
The previous `pre-commit` hook declaration, using `language: 'script'`, relied on `woke` already being installed on the user's path, which is a somewhat awkward requirement compared to most other `pre-commit` hooks which tend to be self-contained. It also meant that it wasn't possible to pin `woke` to a particular version on a per-repository basis using something like `rev: v0.15.0`. Using `language: 'golang'` instead means that `pre-commit` builds a self-contained installation of `woke` for itself. The only downside is that the `go` binary on the user's path must be at least version 1.17, which can be a bit annoying (for example, on Ubuntu 20.04 it requires using something like the `go` snap rather than the .deb). However, this will become less of a problem over time. In order to avoid a breaking change for people already using the old approach, I added this as a new alternative hook, called `woke-from-source`. Add documentation for all this.
- Loading branch information