You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thank you! This is a really good feature to have. I will think it out. Right now lefthook can only notify about deprecated options, and adding a verify step would be really helpful.
Seconding this. On great advice in another thread, I tried to introduce fail_text. However, my brain wasn't functioning, as I instead defined a value for error_text. The job ran still but the error I introduced didn't trigger the text like I assumed would happen. An error stating that I was using an undefined key would be wonderful!
⚡ 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
toremotes
by intent. lefthook still ran without any warnings or errors. I also have to look up every time whether it's calledstage_fixed
,stage_changed
,stage_changes
or something else. Editing thelefthook.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: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.The text was updated successfully, but these errors were encountered: