Skip to content

Commit

Permalink
Merge pull request #48 from suzuki/fix-source-path-for-docker
Browse files Browse the repository at this point in the history
Fix a target path for docker execution
  • Loading branch information
zonuexe authored May 27, 2024
2 parents 084c5cf + 45f158c commit 94d373a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,17 @@ it returns the value of `SOURCE' as it is."
(defun phpstan-analyze-this-file ()
"Analyze current buffer-file using PHPStan."
(interactive)
(let ((file (expand-file-name (or buffer-file-name
(read-file-name "Choose a PHP script: ")))))
(let ((file (phpstan-normalize-path
(expand-file-name (or buffer-file-name
(read-file-name "Choose a PHP script: "))))))
(compile (mapconcat #'shell-quote-argument
(phpstan-get-command-args :include-executable t :args (list file)) " "))))

;;;###autoload
(defun phpstan-analyze-file (file)
"Analyze a PHP script FILE using PHPStan."
(interactive (list (expand-file-name (read-file-name "Choose a PHP script: "))))
(interactive (list (phpstan-normalize-path
(expand-file-name (read-file-name "Choose a PHP script: ")))))
(compile (mapconcat #'shell-quote-argument
(phpstan-get-command-args :include-executable t :args (list file)) " ")))

Expand Down

0 comments on commit 94d373a

Please sign in to comment.