129
129
:safe #'stringp
130
130
:group 'phpstan )
131
131
132
+ (defcustom phpstan-identifier-prefix " 🪪 "
133
+ " Prefix of PHPStan error identifier."
134
+ :type 'string
135
+ :safe #'stringp
136
+ :group 'phpstan )
137
+
132
138
(defcustom phpstan-enable-remote-experimental nil
133
139
" Enable PHPStan analysis remotely by TRAMP.
134
140
@@ -359,14 +365,14 @@ it returns the value of `SOURCE' as it is."
359
365
(let ((file (phpstan--expand-file-name (or buffer-file-name
360
366
(read-file-name " Choose a PHP script: " )))))
361
367
(compile (mapconcat #'shell-quote-argument
362
- (phpstan-get-command-args :include-executable t :args (list file)) " " ))))
368
+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " ))))
363
369
364
370
;;;### autoload
365
371
(defun phpstan-analyze-file (file )
366
372
" Analyze a PHP script FILE using PHPStan."
367
373
(interactive (list (phpstan--expand-file-name (read-file-name " Choose a PHP script: " ))))
368
374
(compile (mapconcat #'shell-quote-argument
369
- (phpstan-get-command-args :include-executable t :args (list file)) " " )))
375
+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " )))
370
376
371
377
;;;### autoload
372
378
(defun phpstan-analyze-project ()
@@ -440,7 +446,7 @@ it returns the value of `SOURCE' as it is."
440
446
((executable-find " phpstan" ) (list (executable-find " phpstan" )))
441
447
(t (error " PHPStan executable not found " )))))))
442
448
443
- (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config )
449
+ (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config verbose )
444
450
" Return command line argument for PHPStan."
445
451
(let ((executable-and-args (phpstan-get-executable-and-args))
446
452
(config (or config (phpstan-normalize-path (phpstan-get-config-file))))
@@ -457,6 +463,12 @@ it returns the value of `SOURCE' as it is."
457
463
(and autoload (list " -a" autoload))
458
464
(and memory-limit (list " --memory-limit" memory-limit))
459
465
(and level (list " -l" level))
466
+ (cond
467
+ ((null verbose) nil )
468
+ ((memq verbose '(1 t )) (list " -v" ))
469
+ ((eq verbose 2 ) (list " -vv" ))
470
+ ((eq verbose 3 ) (list " -vvv" ))
471
+ (error " :verbose option should be 1, 2, 3 or `t' " ))
460
472
(cond
461
473
(phpstan--use-xdebug-option (list phpstan--use-xdebug-option))
462
474
((eq phpstan-use-xdebug-option 'auto )
0 commit comments