Skip to content

Commit f289114

Browse files
xendkzonuexe
andauthored
Handle "No files" message (#43)
Co-authored-by: USAMI Kenta <[email protected]>
1 parent e224a90 commit f289114

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flycheck-phpstan.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
(erase-buffer)
8080
(insert output)
8181
(current-buffer)))
82-
(data (phpstan--parse-json json-buffer))
82+
(data (if (string-prefix-p "{" output)
83+
(phpstan--parse-json json-buffer)
84+
(list (flycheck-error-new-at 1 1 'warning (string-trim output)))))
8385
(errors (phpstan--plist-to-alist (plist-get data :files))))
8486
(unless phpstan-disable-buffer-errors
8587
(phpstan-update-ignorebale-errors-from-json-buffer errors))

0 commit comments

Comments
 (0)