Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

[RFR] Add a regexps-exclude option #100

Merged

Conversation

jpetitcolas
Copy link
Contributor

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 has been created). This way, we can exclude previous patterns with a command line such:

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.

@jeromemacias
Copy link

👍

2 similar comments
@RobinBressan
Copy link

👍

@fzaninotto
Copy link

👍

@wridgers
Copy link

wridgers commented Sep 2, 2014

👍

@jpetitcolas
Copy link
Contributor Author

@sebastianbergmann Any news for this one? :)

@koenhoeymans
Copy link

👍

7 similar comments
@manuquentin
Copy link

👍

@PopDaph
Copy link

PopDaph commented Oct 14, 2014

👍

@Hakadel
Copy link

Hakadel commented Oct 14, 2014

👍

@weejames
Copy link

👍

@ThieryMichel
Copy link

👍

@floriant
Copy link

👍

@vincent
Copy link

vincent commented Dec 16, 2014

👍

@mbessolov
Copy link

👍

1 similar comment
@dxops
Copy link

dxops commented Jun 22, 2015

👍

@marmelexis
Copy link

: +1 :

@Kmaschta
Copy link

Kmaschta commented Feb 5, 2016

👍

1 similar comment
@johackim
Copy link

👍

@sebastianbergmann sebastianbergmann merged commit 3e4cf13 into sebastianbergmann:master Jan 24, 2017
@sebastianbergmann
Copy link
Owner

Thank you for your contribution. Sorry that it took so long to merge your pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.