File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 108
108
(const :tag " No --xdebug option" nil ))
109
109
:group 'phpstan )
110
110
111
+ (defcustom phpstan-baseline-file " phpstan-baseline.neon"
112
+ " File name of PHPStan baseline file."
113
+ :type 'string
114
+ :safe #'stringp
115
+ :group 'phpstan )
116
+
111
117
(defvar-local phpstan--use-xdebug-option nil )
112
118
113
119
;;;### autoload
@@ -336,6 +342,14 @@ it returns the value of `SOURCE' as it is."
336
342
(compile (mapconcat #'shell-quote-argument
337
343
(phpstan-get-command-args :include-executable t :options '(" --generate-baseline" )) " " )))
338
344
345
+ ;;;### autoload
346
+ (defun phpstan-find-baseline-file ()
347
+ " Find PHPStan baseline file of current project."
348
+ (interactive )
349
+ (if-let ((path (locate-dominating-file default-directory phpstan-baseline-file)))
350
+ (find-file (expand-file-name phpstan-baseline-file path))
351
+ (user-error " Baseline file not found. Try running M-x phpstan-generate-baseline" )))
352
+
339
353
;;;### autoload
340
354
(defun phpstan-pro ()
341
355
" Analyze current PHP project using PHPStan Pro."
You can’t perform that action at this time.
0 commit comments