Closed Yerlix closed 8 years ago
Can you try this again with the current dev-master? It seems like this is an issue with staged / unstaged changes. You can find more information on this issue in the tickets: #100, #103
@Yerlix This has been released in https://github.com/phpro/grumphp/releases/tag/v0.8.0 Can you verify this works for you?
This still does not work after updating.
A new file with dpm('test')
triggers an error on phpcs, while an existing file does not
Turns out that GrumPHP only checks .php files while I need it to check .module and .inc files.
@Yerlix add .module and .inc files in your grumphp.yml file:
tasks: phpcs: standard: vendor/drupal/coder/coder_sniffer/Drupal/ ignore_patterns:
- cfg/
- libraries/ triggered_by:
- php
- module
- inc
I'm testing GrumPHP for Drupal, and I've downloaded Drupal Coder Sniffer (https://www.drupal.org/node/1419988) with a ruleset for phpcs. I've installed it locally, not global like they do in the guide.
Now I've noticed that for instance the
dpm('test');
function is picked up when I create a new file (not known to Git) and commit it. But when I've added the same function to an old file (known to Git), GrumPHP did not show an error for it when committing.Now I've tested it again, because I thought that GrumPHP only triggered for new files. But when I try to add some other function (for instance
dsm('test')
to the "new" file, which is committed now, GrumPHP shows an error on commit.My configuration for GrumPHP: