Skip to content

Commit 69bc0a9

Browse files
committed
docs Changed examples of configuration file from yml to php
1 parent 46627a7 commit 69bc0a9

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,30 @@ Run multiple tools in multiple processes at same time (`tool all` command). The
120120

121121
## 6.2. Tools
122122
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:
123-
```yml
124-
Tools:
125-
- phpstan
126-
- security-checker
127-
- parallel-lint
128-
- phpcs
129-
- phpcbf
130-
- phpmd
131-
- phpcpd
123+
124+
```php
125+
'Tools' => [
126+
'security-checker',
127+
'phpstan',
128+
'parallel-lint',
129+
'phpcbf',
130+
'phpcs',
131+
'phpmd',
132+
'phpcpd',
133+
],
132134
```
135+
133136
The order in which the tools are is the order in which they will be executed.
134137

135138
## 6.3. Setting Tools
136139
In next step you must configure the tools with the same name as in the *Tools* key. For example, for set phpcs:
137-
```yml
138-
phpcs:
139-
executablePath: vendor/bin/phpcs
140-
paths: [src, tests]
141-
ignore: [vendor]
142-
standard: 'PSR12'
140+
```php
141+
'phpcs' => [
142+
'executablePath' => 'phpcs',
143+
'paths' => ['./'],
144+
'standard' => './myRules.xml', // or predefined rules: Squiz, PSR12, Generic, PEAR
145+
'ignore' => ['vendor'],
146+
],
143147
```
144148

145149
All the available options are in the [wiki](https://github.com/Wtyd/githooks/wiki/ConfigurationFile).

0 commit comments

Comments
 (0)