sebastianbergmann/phpcpd — pull request #100 by jpetitcolas (2014-08-22 14:28:04+00:00)
Title: [RFR] Add a regexps-exclude option

This PR adds a new `--regexps-exclude` option to counter a limitation with other options.

The `--names-exclude` option refers only to base name, which forbids to exclude a given path. For instance, if we want to exclude `web/app_*.php` it will not work. We have to exclude `app_*.php` through the `--names-exclude`. But it will also exclude `src/app_test.php` for instance.

The `--regexps-exclude` allows to specify a regexp which will then be inserted into the `notPath` method of the finder (a PR on finder-facade is incoming). This way, we can exclude previous patterns with a command line such:

``` sh
phpcpd.phar --regexps-exclude '~web/app_.*\.php~' myProject
```

This PR can probably helps to fix some issues with the `--exclude` option, and should be an answer to #84.