diff --git a/src/Psalm/IssueBuffer.php b/src/Psalm/IssueBuffer.php index cea931a17ae..a01fa4447ba 100644 --- a/src/Psalm/IssueBuffer.php +++ b/src/Psalm/IssueBuffer.php @@ -222,7 +222,7 @@ public static function add(CodeIssue $e, bool $is_fixable = false) $emitted_key = $issue_type . '-' . $e->getShortLocation() . ':' . $e->getLocation()->getColumn(); if ($reporting_level === Config::REPORT_INFO) { - if (!self::alreadyEmitted($emitted_key)) { + if ($issue_type === 'TaintedInput' || !self::alreadyEmitted($emitted_key)) { self::$issues_data[$e->getFilePath()][] = $e->toIssueData(Config::REPORT_INFO); } @@ -244,7 +244,7 @@ public static function add(CodeIssue $e, bool $is_fixable = false) ); } - if (!self::alreadyEmitted($emitted_key)) { + if ($issue_type === 'TaintedInput' || !self::alreadyEmitted($emitted_key)) { ++self::$error_count; self::$issues_data[$e->getFilePath()][] = $e->toIssueData(Config::REPORT_ERROR); } @@ -599,7 +599,7 @@ function (IssueData $d1, IssueData $d2) : int { } } - if (self::$fixable_issue_counts && $show_suggestions) { + if (self::$fixable_issue_counts && $show_suggestions && !$codebase->taint) { echo str_repeat('-', 30) . "\n"; $total_count = \array_sum(self::$fixable_issue_counts);