-
Notifications
You must be signed in to change notification settings - Fork 263
Description
⚡ Summary
I'd like to see some on-demand validation when I invoke lefthook. Alternatively, it could insert an automatic pre-commit check when the configuration changes.
Value
After updating to 1.6, I first simply changed remote to remotes by intent. lefthook still ran without any warnings or errors. I also have to look up every time whether it's called stage_fixed, stage_changed, stage_changes or something else. Editing the lefthook.yml is something I rarely do and if lefthook runs, I assume that the configuration is valid.
Behavior and configuration changes
There should be printed a warning, if there's a configuration key in the wrong format or not known to lefthook. For example, if I add a stage_changes key to one of the commands, I'd like to see an warning like:
WARNING: "stage_changes" is not known, maybe you mean "stage_fixed"?
An automatic pre-commit check for changes to the lefthook config file would be nice as well, but could be easily added manually if a lefthook verify command is added.