grumphp precommit没有检测到任何错误

时间:2018-05-24 11:38:33

标签: php symfony phpcs php-cs-fixer

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

0 个答案:

没有答案