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
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,6 @@ Then run `composer update wtyd/githooks`.
51
51
52
52
5. [Set the configuration file](#Set-the-configuration-file).
53
53
54
-
55
54
# Usage
56
55
When you commit, all the configured code check tools are automatically launched. If your code pass all checks, GitHooks allows you to commit. If not, you have to fix the code and try again:
57
56
<p>
@@ -85,14 +84,18 @@ But you can set your [own script](https://github.com/Wtyd/githooks/wiki/Console%
85
84
The `githooks.yml` file is splitted on three parts:
86
85
87
86
## Options
88
-
Actually the only option is `execution`. This flag marks how GitHooks will run:
87
+
### Execution
88
+
The `execution` flag marks how GitHooks will run:
89
89
*`full` (the default option): executes always all tools setted against all path setted for each tool.
90
90
For example, you setted phpcs forrunin`src` and `app` directories. The commit only contains modified files from `database` directory. Phpcs will check `src` and `app` directories even if no files in these directories have been modified.
91
91
*`fast`: this option runs the tools only against files modified by commit.
92
92
* This option only affects the following tools: phpcs, phpmd, phpstan, and parallel-lint. The rest of the tools will run as the full option.
93
-
***WARNING!!!** You must set the excludes of the tools either in githooks.yml or in the configuration file of eath tool since this
93
+
***WARNING!!!** You must set the excludes of the tools either in`githooks.yml` or in the configuration file of eath tool since this
94
94
option overwrites the key `paths` of the tools so that they are executed only against the modified files.
95
95
96
+
### Processes
97
+
Run multiple tools in multiple processes at same time (`tool all` command). The default number of processes is 1.
98
+
96
99
## Tools
97
100
It is an array with the name of the tools that GitHooks will run. The name of the tools is their executable. If you want all the tools to be executed, the `Tools` key will be as follows:
protected$signature = 'tool {tool : Tool will be run} {execution? : Override the execution mode of githooks.yml. Values: "fast" and "full"}';
15
-
protected$description = 'Run the tool passed as argument. It must be a supported tool by GitHooks. ';
15
+
protected$signature = 'tool
16
+
{tool : Tool will be run}
17
+
{execution? : Override the execution mode of githooks.yml. Values: "fast" and "full"}
18
+
{--ignoreErrorsOnExit= : Avoids exit error even if the tool finds some trobule. When tool is \'all\' applies for all tools}
19
+
{--otherArguments= : Other tool options not supported by GitHooks}
20
+
{--executablePath= : Path to executable}
21
+
{--paths= : Paths or files against the tool will be executed}
22
+
{--processes= : Number of parallel processes in which the tools will be executed}';
23
+
24
+
protected$description = 'Run the tool passed as argument. It must be a supported tool by GitHooks. the available options depend on the tool passed as parameter';
0 commit comments