1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Make reportInfo="false" flag better

This commit is contained in:
Brown 2020-09-01 18:09:30 -04:00 committed by Daniil Gentili
parent bc040945ca
commit 400ac0f759
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -1465,6 +1465,10 @@ class Config
$reporting_level = $this->getReportingLevelForFile($issue_type, $e->getFilePath());
}
if (!$this->report_info && $reporting_level === self::REPORT_INFO) {
$reporting_level = self::REPORT_SUPPRESS;
}
$parent_issue_type = self::getParentIssueType($issue_type);
if ($parent_issue_type && $reporting_level === Config::REPORT_ERROR) {
@ -1593,7 +1597,7 @@ class Config
$issue_level = $issue_class::ERROR_LEVEL;
if ($issue_level > 0 && $issue_level < $this->level) {
return $this->report_info ? self::REPORT_INFO : self::REPORT_SUPPRESS;
return self::REPORT_INFO;
}
return self::REPORT_ERROR;