-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Labels
feature requestA new lefthook feature descriptionA new lefthook feature description
Description
⚡ Summary
I am not sure lefthook or even git hooks are the right tools but I have the following problem:
I have a set of private generic hooks (think commitlint, spell check, etc.) which I would like to run on every git repo and:
- I want to avoid manually configuring a configuration file in every repo.
- I want to keep those hooks private.
- I want to use them in repos where hooks are not "officially" used or other hooks are used (manual ones, using other frameworks like
pre-commit.com).Note: One issue here is that I cannot use a
lefthook-local.yamlwithout aleftook.yamlpresent which is a problem in some repos.
Value
It allows to automate part of my workflow and ensures I don't forget to run some checks.
Behavior and configuration changes
This might be related to #29 (symlinks won't work in my case). But a couple options are:
- Lefthook should run with just a
lefthook-local.yamlwithout alefthook.yamlbeing present.
This would allow running lefthook privately without a shared config (kind of how git hooks originally work) - To build on top of the proposal abvve, Lefthook could read a configuration file located in the
GIT_DIR(default:.git). This would allow syncing a base configuration to all repos withgit initand a git template.- This configuration file should not take precedence over the
lefthook{,-local}.yamlfiles as it only holds a base config. - Lefthook should as well run with just that file if present.
- This configuration file should not take precedence over the
- More closely related, but lefthook could on top of (or instead of) the above proposals read a global configuration (think
$XDG_CONFIG_HOME/lefthook.yaml) which would act as a base configuration and could be overwritten by any configuration file within the repository.
boiledfroginthewell, janlarres and fohte
Metadata
Metadata
Assignees
Labels
feature requestA new lefthook feature descriptionA new lefthook feature description