Skip to content

Commit 85d41cb

Browse files
committed
Add config option
1 parent afb83ac commit 85d41cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

phpstan.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ it returns the value of `SOURCE' as it is."
421421
((executable-find "phpstan") (list (executable-find "phpstan")))
422422
(t (error "PHPStan executable not found")))))))
423423

424-
(cl-defun phpstan-get-command-args (&key include-executable use-pro args format options)
424+
(cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config)
425425
"Return command line argument for PHPStan."
426426
(let ((executable-and-args (phpstan-get-executable-and-args))
427-
(path (phpstan-normalize-path (phpstan-get-config-file)))
427+
(config (or config (phpstan-normalize-path (phpstan-get-config-file))))
428428
(autoload (phpstan-get-autoload-file))
429429
(memory-limit (phpstan-get-memory-limit))
430430
(level (phpstan-get-level)))
@@ -434,7 +434,7 @@ it returns the value of `SOURCE' as it is."
434434
(format "--error-format=%s" (or format "raw"))
435435
"--no-progress" "--no-interaction")
436436
(and use-pro (list "--pro" "--no-ansi"))
437-
(and path (list "-c" path))
437+
(and config (list "-c" config))
438438
(and autoload (list "-a" autoload))
439439
(and memory-limit (list "--memory-limit" memory-limit))
440440
(and level (list "-l" level))

0 commit comments

Comments
 (0)