我无法让grumphp
在子目录中工作。
我的目录结构如下:
/api/grumphp.yml
/api/composer.json
/api/src/
grumphp.yml内容:
parameters:
git_dir: ../.
bin_dir: vendor/bin
ascii:
failed: ~
succeeded: ~
tasks:
phplint: ~
phpcsfixer2: ~
xmllint:
ignore_patterns: []
load_from_net: true
x_include: false
dtd_validation: true
scheme_validation: true
triggered_by: [xml]
我的composer.json文件包含:
"extra": {
"grumphp": {
"config-default-path": "./grumphp.yml"
}
输出
GrumPHP detected a pre-commit command.
GrumPHP is sniffing your code!
Running task 1/3: PhpCsFixerV2... ✔
Running task 2/3: PhpLint... ✔
Running task 3/3: XmlLint... ✔
GrumPHP detected a commit-msg command.
GrumPHP is sniffing your code!
运行命令vendor/bin/grumphp run
确实给了我预期的PHPCS错误