2

我无法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 错误

4

0 回答 0