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

[RFR] Add a regexps-exclude option#100

Merged
sebastianbergmann merged 1 commit intosebastianbergmann:masterfrom
jpetitcolas:paths_exclude
Jan 24, 2017
Merged

[RFR] Add a regexps-exclude option#100
sebastianbergmann merged 1 commit intosebastianbergmann:masterfrom
jpetitcolas:paths_exclude

Conversation

@jpetitcolas
Copy link
Copy Markdown
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
Copy Markdown

👍

2 similar comments
@RobinBressan
Copy link
Copy Markdown

👍

@fzaninotto
Copy link
Copy Markdown

👍

@wridgers
Copy link
Copy Markdown

wridgers commented Sep 2, 2014

👍

@jpetitcolas
Copy link
Copy Markdown
Contributor Author

@sebastianbergmann Any news for this one? :)

@koenhoeymans
Copy link
Copy Markdown

👍

7 similar comments
@manuquentin
Copy link
Copy Markdown

👍

@PopDaph
Copy link
Copy Markdown

PopDaph commented Oct 14, 2014

👍

@Hakadel
Copy link
Copy Markdown

Hakadel commented Oct 14, 2014

👍

@weejames
Copy link
Copy Markdown

👍

@ThieryMichel
Copy link
Copy Markdown

👍

@floriant
Copy link
Copy Markdown

👍

@vincent
Copy link
Copy Markdown

vincent commented Dec 16, 2014

👍

@mbessolov
Copy link
Copy Markdown

👍

1 similar comment
@dxops
Copy link
Copy Markdown

dxops commented Jun 22, 2015

👍

@marmelexis
Copy link
Copy Markdown

: +1 :

@Kmaschta
Copy link
Copy Markdown

Kmaschta commented Feb 5, 2016

👍

1 similar comment
@johackim
Copy link
Copy Markdown

👍

@sebastianbergmann sebastianbergmann merged commit 3e4cf13 into sebastianbergmann:master Jan 24, 2017
@sebastianbergmann
Copy link
Copy Markdown
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.