Closed rschmukler closed 3 years ago
Reviewed by @sogaiu
@rschmukler Looks good, although I wondered if eval
was really necessary. I think flycheck-clj-kondo-lang
is a better name than flycheck-clj-kondo-lint-lang
since the option is called lang
and not lint-lang
.
@borkdude thanks for the review. I've updated the variable name. The eval
is part of the flycheck-substitute-argument
syntax. Just to be sure, I tried removing it and the macro fails to compile without it.
Thanks again!
Adds functionality to override the linting language used by clj-kondo.
When connected to sibling cljs and clj repls in cider, it will use the major mode to decide where to execute evaluated sexps. When working with cljc files it can be useful to set the major mode of emacs to clojure-mode or clojurescript-mode to restrict where the sexps are being evaluated while you develop.
This PR adds the ability for a buffer to specify the language it would like to be linted as, allowing cljc buffers being edited in clojure-mode to still be linted by the cljc linter in clj-kondo.