Open andrey-tech opened 7 months ago
Hey @andrey-tech, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.
Hey @psalm-github-bot, I can't reproduce the issue on psalm.dev, because this is a console options issue.
The problem in class \Psalm\Report\CompactReport
:
76 // If we're at the end of the issue sets, then wrap up the last table and render it out.
77 if ($i === count($this->issues_data) - 1) {
78 $table->render();
79 $output[] = $buffer->fetch();
80 }
The condition inside this if
will never be true
if array $this->issues_data
has non-sequential integer keys, so $table->render()
will not be executed.
For example, if baseline file is used, then $this->issues_data
is:
Array
(
[9] => Psalm\Internal\Analyzer\IssueData Object(...)
[10] => Psalm\Internal\Analyzer\IssueData Object(...)
)
Hi!
I have a problem with Psalm v5.23.1 and PHP 8.1: new errors are NOT SHOWN in the console if I use baseline file and
output-format=compact
(other output formats - OK). Please check and fix!Description
1) Example with option
--output-format=compact
— new errors are NOT SHOWN in the console, but Psalm exit code is2
:2) Example without option
--output-format
all new errors are SHOWN in the console and Psalm exit code is2
: