From 371a3ff847a49bf7892bea5d088967aaf94fbff6 Mon Sep 17 00:00:00 2001 From: Tom de Wit Date: Sat, 7 Dec 2019 14:42:34 +0100 Subject: [PATCH] Add file_name to errors details --- src/Linter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Linter.php b/src/Linter.php index 6397eea5..c8f006ad 100644 --- a/src/Linter.php +++ b/src/Linter.php @@ -119,7 +119,7 @@ public function lint($files = [], $cache = true) unset($running[$filename]); if ($lint->hasSyntaxError()) { $processCallback('error', $item['file']); - $errors[$filename] = array_merge(['file' => $filename], $lint->getSyntaxError()); + $errors[$filename] = array_merge(['file' => $filename, 'file_name' => $relativePathname], $lint->getSyntaxError()); } else { $newCache[$item['relativePath']] = md5_file($filename); $processCallback('ok', $item['file']);