Git Hooks
Captain Hook
We use Captain Hook to enforce certain conditions on the pre-commit git hook for themes and plugins. Currently these are:
- conventional commits formatting
- php syntax linting (built in to Captain Hook)
- php cs fixer
We'll eventually add unit and integration testing once they make it back into the framework from our own projects.
Captain Hook is a composer dev dependency in Forme plugin and theme projects.
When you create a new theme or plugin project using the code generator, it should trigger the install automatically. You can also initialise it manually.
bash
composer git-hooks