File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ All notable changes of the phpactor.el are documented in this file using the [Ke
88
99* Add ` phpstan-analyze-this-file ` command
1010* Add ` phpstan.dist.neon ` to ` phpstan-get-config-file ` as PHPStan config files.
11+ * Add ` phpstan-pro ` command to launch [ PHPStan Pro] .
12+
13+ [ PHPStan Pro ] : https://phpstan.org/blog/introducing-phpstan-pro
1114
1215### Changed
1316
Original file line number Diff line number Diff line change @@ -300,6 +300,15 @@ it returns the value of `SOURCE' as it is."
300300 (compile (mapconcat #'shell-quote-argument
301301 (append (phpstan-get-command-args :include-executable t ) (list file)) " " )))
302302
303+ ;;;### autoload
304+ (defun phpstan-pro ()
305+ " Analyze current PHP project using PHPStan Pro."
306+ (interactive )
307+ (let ((compilation-buffer-name-function (lambda (_ ) " *PHPStan Pro*" ))
308+ (command (mapconcat #'shell-quote-argument
309+ (phpstan-get-command-args :include-executable t :use-pro t ) " " )))
310+ (compile command t )))
311+
303312(defun phpstan-get-executable-and-args ()
304313 " Return PHPStan excutable file and arguments."
305314 (cond
@@ -347,6 +356,7 @@ it returns the value of `SOURCE' as it is."
347356 (append (if include-executable (list (car executable-and-args)) nil )
348357 (cdr executable-and-args)
349358 (list " analyze" " --error-format=raw" " --no-progress" " --no-interaction" )
359+ (and use-pro (list " --pro" " --no-ansi" ))
350360 (and path (list " -c" path))
351361 (and autoload (list " -a" autoload))
352362 (and memory-limit (list " --memory-limit" memory-limit))
You can’t perform that action at this time.
0 commit comments