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

Hide fixable issues when running with taint analysis

Fixes #3722
This commit is contained in:
Brown 2020-07-01 08:55:58 -04:00
parent 17558a5c0e
commit cceacde01d

View File

@ -222,7 +222,7 @@ class IssueBuffer
$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 @@ class IssueBuffer
);
}
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 @@ class IssueBuffer
}
}
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);