diff --git a/src/Reporter.php b/src/Reporter.php index 824031a485..78970bc59f 100644 --- a/src/Reporter.php +++ b/src/Reporter.php @@ -290,6 +290,10 @@ public function cacheFileReport(File $phpcsFile) $generatedReport = ob_get_contents(); ob_end_clean(); + if ($this->config->colors !== true) { + $generatedReport = Common::stripColors($generatedReport); + } + if ($report['output'] === null) { // Using a temp file. if (isset($this->tmpFiles[$type]) === false) {