Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flycheck-phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

(defun flycheck-phpstan--enabled-and-set-variable ()
"Return path to phpstan configure file, and set buffer execute in side effect."
(let ((enabled (and (phpstan-get-working-dir) (phpstan-get-config-file))))
(let ((enabled (or (phpstan-get-working-dir) (phpstan-get-config-file))))
(prog1 enabled
(when (and phpstan-flycheck-auto-set-executable
(not (and (boundp 'flycheck-phpstan-executable)
Expand Down
10 changes: 6 additions & 4 deletions phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ NIL
(expand-file-name (cdr phpstan-config-file) (php-project-get-root-dir))
phpstan-config-file)
(let ((working-directory (phpstan-get-working-dir)))
(cl-loop for name in '("phpstan.neon" "phpstan.neon.dist")
for dir = (locate-dominating-file working-directory name)
if dir
return (expand-file-name name dir)))))
(if working-directory
nil
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is mistake. Fixed in e32ef8e

(cl-loop for name in '("phpstan.neon" "phpstan.neon.dist")
for dir = (locate-dominating-file working-directory name)
if dir
return (expand-file-name name dir))))))

(defun phpstan-normalize-path (source-original &optional source)
"Return normalized source file path to pass by `SOURCE-ORIGINAL' OR `SOURCE'.
Expand Down