Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ignoreDotFiles(true) does not exclude folders properly #4911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stof opened this issue Jul 14, 2012 · 0 comments
Closed

ignoreDotFiles(true) does not exclude folders properly #4911

stof opened this issue Jul 14, 2012 · 0 comments

Comments

@stof
Copy link
Member

stof commented Jul 14, 2012

I found a weird behavior with ignoreDotFiles(true): the testsuite of the ExcludeDirectoryFilterIterator passes properly but folder starting with a dot are not ignored.

I found it when using the PHP-CS-Fixer (which calls this method in its DefaultFinder).

mkdir .test
echo "foo     " > .test/foo.php
php-cs-fixer fix . --dry-run

Expected output: no change.
Actual output: .test/foo.php is modified

This is a bit annoying as it means that the fixer messes with the .idea folder holding the PHPStorm metadata.

FYI, I found this bug on Windows. I don't know if it is a platform-specific bug or if it affects Unix environments as well.

@gajdaw gajdaw mentioned this issue Jul 31, 2012
fabpot added a commit that referenced this issue Feb 26, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7188).

Commits
-------

3b2cb79 [Finder] fixed paths/notPaths regex for shell adapters
45b84c5 [Finder] fix issue 4911

Discussion
----------

[Finder] Fixes paths/notPaths issue with shell adapters

This PR is built upon #5128 from @gajdaw.
It fixes wrong handling of regex in `paths` and `notPaths` criteria by shell adapters.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #4911, #5128
@fabpot fabpot closed this as completed Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants