Skip to content

Commit 6dc8f1d

Browse files
committed
Add phpstan-generate-baseline-options for default adds --allow-empty-baseline
1 parent 8a0889d commit 6dc8f1d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

phpstan.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
(const :tag "No --xdebug option" nil))
109109
:group 'phpstan)
110110

111+
(defcustom phpstan-generate-baseline-options '("--generate-baseline" "--allow-empty-baseline")
112+
"Command line options for generating PHPStan baseline."
113+
:type '(repeat string)
114+
:safe #'listp
115+
:group 'phpstan)
116+
111117
(defcustom phpstan-baseline-file "phpstan-baseline.neon"
112118
"File name of PHPStan baseline file."
113119
:type 'string
@@ -355,7 +361,7 @@ it returns the value of `SOURCE' as it is."
355361
(php-project-get-root-dir)
356362
default-directory)))
357363
(compile (mapconcat #'shell-quote-argument
358-
(phpstan-get-command-args :include-executable t :options '("--generate-baseline")) " "))))
364+
(phpstan-get-command-args :include-executable t :options phpstan-generate-baseline-options) " "))))
359365

360366
;;;###autoload
361367
(defun phpstan-find-baseline-file ()

0 commit comments

Comments
 (0)