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 108108 (const :tag " No --xdebug option" nil ))
109109 :group 'phpstan )
110110
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+
111117(defvar-local phpstan--use-xdebug-option nil )
112118
113119;;;### autoload
@@ -336,6 +342,14 @@ it returns the value of `SOURCE' as it is."
336342 (compile (mapconcat #'shell-quote-argument
337343 (phpstan-get-command-args :include-executable t :options '(" --generate-baseline" )) " " )))
338344
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+
339353;;;### autoload
340354(defun phpstan-pro ()
341355 " Analyze current PHP project using PHPStan Pro."
You can’t perform that action at this time.
0 commit comments