31,003
edits
Tag: 2017 source edit |
Tag: 2017 source edit |
||
| Line 75: | Line 75: | ||
=== Install Pre-commit githook === | === Install Pre-commit githook === | ||
You can use git hooks to check the syntax of the file you commit and cancel (or better autofix) the commit if something is wrong. | You can use git hooks to check the syntax of the file you commit and cancel (or better autofix) the commit if something is wrong. | ||
Instruction to install such a precommit hook is available on this file: | |||
https://wiki.dolibarr.org/index.php?title=Environment_and_development_tools#Install_Pre-commit_githook | |||
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). | ||
Once installed, the hook will start on your next commit to re-format your code, so your code will always match the coding syntax rules. If everybody enable this hook, everybody will use the same coding syntax rule, so it is highly recommended to enable it if you can. If something is wrong in the syntax, the commit will be immediately canceled. If it can be fixed automatically, phpcbf will fix it so you just have to try the commit a second time to have it validated. | Once installed, the hook will start on your next commit to re-format your code, so your code will always match the coding syntax rules. If everybody enable this hook, everybody will use the same coding syntax rule, so it is highly recommended to enable it if you can. If something is wrong in the syntax, the commit will be immediately canceled. If it can be fixed automatically, phpcbf, installed during the install of the precommit hook, will fix it so you just have to try the commit a second time to have it validated. | ||
=[[File:Computer.png]] Optional= | =[[File:Computer.png]] Optional= | ||
There are a lot of more components you can install to get more technologies support: | There are a lot of more components you can install to get more technologies support: | ||
[[Environment and development tools - Optionnal components]] | [[Environment and development tools - Optionnal components]] | ||