Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.06 KB

lefthook.md

File metadata and controls

42 lines (27 loc) · 1.06 KB

Lefthook

Lefthook is a Git hooks manager that allows custom logic to be executed prior to Git committing or pushing. GDK comes with Lefthook configuration (lefthook.yml), but it must be installed.

We have a lefthook.yml checked in but is ignored until Lefthook is installed.

Install Lefthook

  1. Install the lefthook Ruby gem:

    bundle install
  2. Install Lefthook managed Git hooks:

    bundle exec lefthook install
  3. Test Lefthook is working by running the Lefthook prepare-commit-msg Git hook:

    bundle exec lefthook run prepare-commit-msg

This should return a fully qualified path command with no other output.

Run Lefthook hooks manually

To run the pre-push Git hook, run:

bundle exec lefthook run pre-push

Troubleshooting: Vale not found error

If you get the error ERROR: Vale not found when running Lefthook, you can install it manually.