git-hooks.nix
git-hooks.nix copied to clipboard
Per-file mode
Re: #72, it would be nice if pre-commit-hooks supported a "map"-like operation for tools or modes of tools that can only work a file at a time. One possible implementation would be that you specify this mode as a flag and then pre-commit-hooks uses a find command with the supplied glob to do the work. That would permit a variant of #72 to work and also support purty for PureScript formatting, which apparently only works in file-at-a-time mode.
Thoughts?
Note that we have a bunch of helpers these days that iterate a directory, see mdsh for an example.