You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHooks helps you to manage the code validation tools. For example, in precommit stage, you can:
17
+
GitHooks helps you to manage the code validation tools in git hooks. For example, in precommit stage, you can:
13
18
1. Validate that the code follows the project standards.
14
19
2. Verify that the code has no language syntax errors.
15
20
3. Look for errors in the code (unused variables, excessive cyclomatic complexity, etc.).
@@ -24,21 +29,20 @@ GitHooks centralizes the configuration of the code validation tools and makes it
24
29
* Or your owns scripts for the hooks.
25
30
26
31
# Install
27
-
1. GitHooks must be installed like dev requirement with composer. Actually, it does not have [.phar](https://www.php.net/phar) support.
28
-
32
+
1. GitHooks must be installed like dev requirement with composer. Currently, it does not have [.phar](https://www.php.net/phar) packaging.
29
33
```bash
30
34
composer require --dev wtyd/githooks
31
35
```
32
36
33
-
1. Install all needed [supported tools](#supported-tools). The installation method for the tools can be:
37
+
2. Install all needed [supported tools](#supported-tools). The installation method for the tools can be:
34
38
- Like global dependency with composer: `composer global require squizlabs/php_codesniffer`
35
39
- Like dev requirement in the project: `composer require --dev sebastian/phpcpd`
36
40
- Like .phar on the root of the project or with global access.
37
41
38
-
1. Initialize GitHooks with `vendor/bin/githooks conf:init`. This command creates the configuration file in the root paths (`githooks.yml`).
39
-
1. Run `vendor/bin/githooks hook`. It Copies the script forlaunch GitHooks on the precommit eventin`.git/hooks` directory. You can, also run `vendor/bin/githooks hook otherHook MyScriptFile.php`forset any hook with a custom script.
42
+
3. Initialize GitHooks with `vendor/bin/githooks conf:init`. This command creates the configuration file in the root paths (`githooks.yml`).
43
+
4. Run `vendor/bin/githooks hook`. It Copies the script forlaunch GitHooks on the precommit eventin`.git/hooks` directory. You can, also run `vendor/bin/githooks hook otherHook MyScriptFile.php`forset any hook with a custom script.
40
44
41
-
1. [Set the configuration file](#Set-the-configuration-file).
45
+
5. [Set the configuration file](#Set-the-configuration-file).
42
46
43
47
44
48
# Usage
@@ -64,6 +68,8 @@ At this moment, the supported tools are:
But you can set your [own script](https://github.com/Wtyd/githooks/wiki/Console%20Commands#Hook) on any git hook.
72
+
67
73
# Set the Configuration File
68
74
The `githooks.yml` file is splitted on three parts:
69
75
@@ -137,7 +143,7 @@ Many of the options are *optional* as long as the tool has a properly establishe
137
143
</p>
138
144
139
145
# Contributing
140
-
Contributions from others would be very much appreciated! Send pull [request](https://github.com/Wtyd/githooks/pulls)/[issue](https://github.com/Wtyd/githooks/issues). Check all steps for do that at Wiki section for [Contributing](https://github.com/Wtyd/githooks/wiki). Thanks!
146
+
Contributions from others would be very much appreciated! Send pull [request](https://github.com/Wtyd/githooks/pulls)/[issue](https://github.com/Wtyd/githooks/issues). Check all steps for do that at Wiki section for [Contributing](https://github.com/Wtyd/githooks/wiki/Contributing). Thanks!
141
147
142
148
# License
143
149
The MIT License (MIT). Please see [License File](/LICENSE) for more information.
0 commit comments