Skip to content

Dev do not pass nondirs to psalm - #123

Closed
flavius wants to merge 3 commits into
EdgedesignCZ:masterfrom
flavius:dev-do-not-pass-nondirs-to-psalm
Closed

Dev do not pass nondirs to psalm#123
flavius wants to merge 3 commits into
EdgedesignCZ:masterfrom
flavius:dev-do-not-pass-nondirs-to-psalm

Conversation

@flavius

@flaviusflavius commented Mar 13, 2018

Copy link
Copy Markdown

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

zdenekdrahos commented Mar 17, 2018

Copy link
Copy Markdown
Member

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@flavius@zdenekdrahos