Psalm: Exclude files based on pattern

Created on 31 Jan 2017  路  5Comments  路  Source: vimeo/psalm

Actually it's not possible to use patterns like:

<directory name="*lib*" />
enhancement

Most helpful comment

@fesor have added that (and directory pattern matching works as well)

All 5 comments

The second example <directory name="/vendor/*" /> is redundant (as <directory name="/vendor" /> has the same effect.

But I'll add support for wildcard matching.

yes, for the second one you are right, I update the first commit

And how about file patterns? For example I want to suppress specific issues for specific files, all of which has some kind of suffix.

<file name="*DTO.php" />

@fesor have added that (and directory pattern matching works as well)

Do these patterns only work when the whole project is scanned?
I'm specifying a path as argument and have the extension marked as suppresed but it throws Could not resolve config path to /my/project/dir//*.phtml

psalm.xml

        <InvalidScope>
            <errorLevel type="suppress">
                <file name="*.phtml"/>
            </errorLevel>
        </InvalidScope>

command

./vendor/bin/psalm --show-info=true app/code/Folder/Folder/view/frontend/templates/folder/file.phtml
Was this page helpful?
0 / 5 - 0 ratings

Related issues

zerkms picture zerkms  路  3Comments

greg0ire picture greg0ire  路  3Comments

tux-rampage picture tux-rampage  路  3Comments

vudaltsov picture vudaltsov  路  3Comments

weirdan picture weirdan  路  4Comments