This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-14
Channels
- # babashka (53)
- # beginners (158)
- # calva (25)
- # cider (21)
- # clara (1)
- # clj-kondo (12)
- # cljsrn (6)
- # clojure (94)
- # clojure-australia (2)
- # clojure-bay-area (6)
- # clojure-europe (40)
- # clojure-nl (10)
- # clojure-spec (16)
- # clojure-uk (18)
- # clojurescript (95)
- # cursive (14)
- # data-science (1)
- # datascript (6)
- # datomic (18)
- # depstar (2)
- # duct (36)
- # emacs (15)
- # events (4)
- # fulcro (16)
- # graalvm (10)
- # helix (25)
- # honeysql (6)
- # jackdaw (4)
- # jobs (2)
- # leiningen (24)
- # lsp (4)
- # malli (10)
- # off-topic (3)
- # pathom (3)
- # polylith (19)
- # practicalli (4)
- # prelude (1)
- # re-frame (6)
- # reagent (13)
- # reitit (3)
- # remote-jobs (10)
- # ring (12)
- # ring-swagger (2)
- # shadow-cljs (54)
- # testing (17)
- # tools-deps (10)
- # xtdb (14)
Even though kondo added Core.match support in 2021.02.13 i still get errors on _
and variable binding. Anything i can do about this?
src/language.cljs:52:17: error: Unresolved symbol: _
src/language.cljs:148:66: error: Unresolved symbol: last-type
src/language.cljs:149:74: error: Unresolved symbol: opt
...
Of course, sorry: around line 52:
(match [word-class source-type (h/import-type ast) last-valid first-failure expr-settings]
[_ _ _ (_ :guard (partial h/empty-command? command)) _ _] [:command]
...)]
around line 148:
(match [word-class (h/empty-word? word) source-type last-valid first-failure expr-settings option-settings]
...
[:option false _ _ _ _ {:inside-paren? true :last-type last-type}] #{last-type}
[:option _ _ _ _ _ {:parenopt? true :closed? false :option opt}] #{(h/opt-param-type command (:name opt))}
...)]
Hey, I believe I'm missing it in the documentation, but how do I register macros with lint-as
in a namespace's metadata?
I think I figured it out, noting it here for posterity:
:clj-kondo/config
in the ns form takes a quoted map.
for it to work the linted-as symbol needs to be fully qualified.
Is there anything I missed?
@sigve.nordgaard I don't get any lint warnings using this:
(require '[clojure.core.match :refer [match]])
(let [command :foo]
(match []
[_ _ _ (_ :guard (partial apply command)) _ _] [:command]
))