Skip to content

Full Looping; Directory-Based + Packaged-Based Hooks : v0.6.0

Compare
Choose a tag to compare
@TekWizely TekWizely released this 01 Jul 20:52
· 32 commits to master since this release
0cacfe3

Release v0.6.0

Delayed Error == More Error Messages

For hooks that loop over the input file list, I updated the loop pattern so I could run over the entire loop, instead of exiting after the first error. This should allow you to see more errors sooner.

Directory-Based Hooks

I also added Directory-Based and Packaged-Based versions of the build, test, vet, and golangci hooks.
Instead of running against each staged file individually, these new hooks will run against the staged file's parent folder.

NOTE: By design, the directory-based hooks only execute against a given directory once per hook invocation.
HOWEVER, due to OS command-line length limits, Pre-Commit can invoke a hook multiple times if a large number of files are staged.