File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 90
90
91
91
(defun flymake-phpstan (report-fn &rest _ignored-args )
92
92
" Flymake backend for PHPStan report using REPORT-FN."
93
- (let ((command-args (phpstan-get-command-args t )))
93
+ (let ((command-args (phpstan-get-command-args :include-executable t )))
94
94
(unless (car command-args)
95
95
(user-error " Cannot find a phpstan executable command" ))
96
96
(when (process-live-p flymake-phpstan--proc)
97
97
(kill-process flymake-phpstan--proc))
98
- (let ((source (current-buffer )))
98
+ (let ((source (current-buffer ))
99
+ (target-path (if (or (buffer-modified-p ) (not buffer-file-name))
100
+ (phpstan-normalize-path
101
+ (flycheck-save-buffer-to-temp #'flycheck-temp-file-inplace ))
102
+ buffer-file-name)))
99
103
(save-restriction
100
104
(widen )
101
- (setq flymake-phpstan--proc (flymake-phpstan-make-process (php-project-get-root-dir) command-args report-fn source ))
105
+ (setq flymake-phpstan--proc (flymake-phpstan-make-process (php-project-get-root-dir) ( append command-args ( list " -- " target-path)) report-fn source ))
102
106
(process-send-region flymake-phpstan--proc (point-min ) (point-max ))
103
107
(process-send-eof flymake-phpstan--proc)))))
104
108
You can’t perform that action at this time.
0 commit comments