Environment and development tools: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 75: Line 75:
Go to '''/dev/setup/git/hooks''' of your local repository, copy the file '''pre-commit''' into a '''.git/hooks''' folder of the local git repository and make it executable.
Go to '''/dev/setup/git/hooks''' of your local repository, copy the file '''pre-commit''' into a '''.git/hooks''' folder of the local git repository and make it executable.


Next, you need to edit pre-commit file in .git/hooks to modify the DIRPHPCS variable to set the path of your phpcs and phpcbf tool (you can keep them empty if tools ara available into your PATH).
Next, you need to edit pre-commit file in .git/hooks to modify the DIRPHPCS variable to set the path of your phpcs and phpcbf tool (you can keep them empty if tools are available into your PATH).


Such hooks will work when using on command line but may also work when committing using your common IDE (it has been validated with Eclipse and VSC).  
Such hooks will work when using on command line but may also work when committing using your common IDE (it has been validated with Eclipse and VSC).  

Navigation menu