Skip to content

Commit a5f1711

Browse files
committed
Modify flycheck checker
1 parent c48251b commit a5f1711

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

phpstan.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@
100100
(when (featurep 'flycheck)
101101
(flycheck-define-checker phpstan-checker
102102
"PHP static analyzer based on PHPStan."
103-
:command ("phpstan"
104-
"analyze"
105-
"--no-progress"
106-
"--errorFormat=raw"
103+
:command ("php" (eval (phpstan-get-executable))
104+
"analyze" "--errorFormat=raw" "--no-progress" "--no-interaction"
105+
"-c" (eval (phpstan-get-configure-file))
106+
"-l" (eval (phpstan-get-level))
107107
source)
108108
:working-directory (lambda (_) (php-project-get-root-dir))
109-
:enabled (lambda () (locate-dominating-file "phpstan.neon" default-directory))
109+
:enabled (lambda () (phpstan-get-configure-file))
110110
:error-patterns
111111
((error line-start (1+ (not (any ":"))) ":" line ":" (message) line-end))
112112
:modes (php-mode)

0 commit comments

Comments
 (0)