8000 [Twig][Lint] Add line numbers to JSON output. · symfony/symfony@4be875e · GitHub
[go: up one dir, main page]

Skip to content

Commit 4be875e

Browse files
[Twig][Lint] Add line numbers to JSON output.
1 parent 684f62e commit 4be875e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private function validate(Environment $twig, $template, $file)
145145
} catch (Error $e) {
146146
$twig->setLoader($realLoader);
147147

148-
return array('template' => $template, 'file' => $file, 'valid' => false, 'exception' => $e);
148+
return array('template' => $template, 'file' => $file, 'line' => $e->getTemplateLine(), 'valid' => false, 'exception' => $e);
149149
}
150150

151151
return array('template' => $template, 'file' => $file, 'valid' => true);

0 commit comments

Comments
 (0)
0