From a558bda44c4cb65b69fa53df233e8941ebd195c5 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 2 Nov 2020 12:28:51 +0100 Subject: [PATCH] [#12] Support --filename for upcoming clj-kondo --- flycheck-clj-kondo.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flycheck-clj-kondo.el b/flycheck-clj-kondo.el index 2eca6c6..f76c36f 100644 --- a/flycheck-clj-kondo.el +++ b/flycheck-clj-kondo.el @@ -60,12 +60,16 @@ Argument EXTRA-ARGS: passes extra args to the checker." :command ("clj-kondo" "--lint" "-" "--lang" (eval (or flycheck-clj-kondo-lang ,lang)) + "--filename" (eval (buffer-file-name)) ,@extra-args) :standard-input t :error-patterns - ((error line-start ":" line ":" column ": " (0+ not-newline) (or "error: " "Exception: ") (message) line-end) - (warning line-start ":" line ":" column ": " (0+ not-newline) "warning: " (message) line-end) - (info line-start ":" line ":" column ": " (0+ not-newline) "info: " (message) line-end)) + ((error line-start (or "" (file-name)) + ":" line ":" column ": " (0+ not-newline) (or "error: " "Exception: ") (message) line-end) + (warning line-start (or "" (file-name)) + ":" line ":" column ": " (0+ not-newline) "warning: " (message) line-end) + (info line-start (or "" (file-name)) + ":" line ":" column ": " (0+ not-newline) "info: " (message) line-end)) :modes (,mode) :predicate (lambda () (or