crazyfactory / php-package-boilerplate

0 stars 0 forks source link

feat(git): Add Hooks #1

Open lalitaCF opened 5 years ago

lalitaCF commented 5 years ago

Add the following start script and hooks:

// commit-msg
#!/bin/sh
composer hook:validate-commit-msg

// pre-commit
#!/bin/sh
composer hook:pre-commit

// pre-push
#!/bin/sh
composer hook:pre-push
adhocore commented 5 years ago

can we also add composer lint to run as git hook for changed/added php files

cyberhck commented 5 years ago

I was thinking, since it's a package and not a very huge monolith app, we'll lint the whole thing, we're doing that in all our npm packages, and it's not slow at all. What do you think?

cyberhck commented 5 years ago

And I changed my mind, we'll not have hook: something, we'll just follow what git expects, very easy to anticipate