Skip to content
New issue

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

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

Already on GitHub? # to your account

phpmd and pdepends have broken ignores again #140

Closed
auroraeosrose opened this issue Jun 27, 2018 · 1 comment
Closed

phpmd and pdepends have broken ignores again #140

auroraeosrose opened this issue Jun 27, 2018 · 1 comment

Comments

@auroraeosrose
Copy link

I'd rather just leave an issue with phpmd or pdepends but neither are really being updated properly (sigh)

The ignore fix that was put in earlier is not quite working properly for these two tools

They no longer seem to need the addition of the /* to ignore directories, but they DO need every forward slash changed to a backslash

The easiest and cleanest way to do this is not to do any detection, but to use the DIRECTORY_SEPARATOR constant as a hack

It does nothing on systems that use forward slashes, and fixes paths on any systems that use backslashes

    public function pdepend()
    {
        return str_replace('/', DIRECTORY_SEPARATOR, $this->ignore(' --ignore=/', '/,/', '/', ',/'));
    }

    public function phpmd()
    {
        return str_replace('/', DIRECTORY_SEPARATOR, $this->ignore(" --exclude /", '/,/', '/', ',/'));
    }
@auroraeosrose
Copy link
Author

thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant