Skip to content
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

ignore patterns and pdepends/phpmd and Windows #75

Closed
auroraeosrose opened this issue Jun 19, 2017 · 0 comments
Closed

ignore patterns and pdepends/phpmd and Windows #75

auroraeosrose opened this issue Jun 19, 2017 · 0 comments

Comments

@auroraeosrose
Copy link

Pdepends and phpmd have a really painful method of doing ignores

they use the same filter class for their file and then PIPE IT THROUGH REGEX (oh, ick)

https://github.com/pdepend/pdepend/blob/master/src/main/php/PDepend/Input/ExcludePathFilter.php

This makes the current method of creating ignore rules complete break on windows (where filesystemiterator will give you back backslashes to compare against) and makes ignore directories a pain because you need both a singular (ignore /vendor) and plural (ignore vendor/*) to work right

I have a pretty horrible hacked up fixed for this at

https://github.com/auroraeosrose/phpqa/blob/powershell_works/src/IgnoredPaths.php#L28
and
https://github.com/auroraeosrose/phpqa/blob/powershell_works/src/IgnoredPaths.php#L54

it's not entirely ideal (I should have pulled them out into a base helper method that each calls) and it still needs file level support added but it works to do ignores properly

But without some sort of a fix ignores are completely non-usable on windows for these two tools

@zdenekdrahos zdenekdrahos changed the title ignore patterns and pdepends/phpmd ignore patterns and pdepends/phpmd and Windows Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant