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

Dev do not pass nondirs to psalm #123

Closed

Conversation

flavius
Copy link

@flavius flavius commented Mar 13, 2018

When analyzing a dir src/, phpmetrics does not detect composer.json (which is ok, since the file is in the directory above, src/../.

However, phpmetrics can be easily fooled to take composer.json into account, by specifying it in analyzeDirs - which is not clean, but it works (WORKAROUND - as mentioned later in this comment).

But when you do that, psalm fails, because it blindly takes everything which is not a dir into its own configuration.

This PR fixes psalm to make the workaround described above possible.

It's a clean fix, regardless of that fact that the workaround is a hack, because the generated psalm xml config is semantically correct with this patch applied: <directory ... are indeed directories.

@zdenekdrahos
Copy link
Member

zdenekdrahos commented Mar 17, 2018

How about adding composer to .phpqa.yml?
Just like defining git binary in #122.

zdenekdrahos added a commit that referenced this pull request Mar 31, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants