Skip to content

Commit e245f87

Browse files
committed
Add format option to phpstan-get-command-args
1 parent 3248a05 commit e245f87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

phpstan.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ it returns the value of `SOURCE' as it is."
368368
((executable-find "phpstan") (list (executable-find "phpstan")))
369369
(t (error "PHPStan executable not found")))))))
370370

371-
(cl-defun phpstan-get-command-args (&key include-executable use-pro args)
371+
(cl-defun phpstan-get-command-args (&key include-executable use-pro args format)
372372
"Return command line argument for PHPStan."
373373
(let ((executable-and-args (phpstan-get-executable-and-args))
374374
(path (phpstan-normalize-path (phpstan-get-config-file)))
@@ -377,7 +377,9 @@ it returns the value of `SOURCE' as it is."
377377
(level (phpstan-get-level)))
378378
(nconc (if include-executable (list (car executable-and-args)) nil)
379379
(cdr executable-and-args)
380-
(list "analyze" "--error-format=raw" "--no-progress" "--no-interaction")
380+
(list "analyze"
381+
(format "--error-format=%s" (or format "raw"))
382+
"--no-progress" "--no-interaction")
381383
(and use-pro (list "--pro" "--no-ansi"))
382384
(and path (list "-c" path))
383385
(and autoload (list "-a" autoload))

0 commit comments

Comments
 (0)