This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-20
Channels
- # announcements (42)
- # babashka (70)
- # beginners (152)
- # chlorine-clover (19)
- # cider (14)
- # clj-kondo (23)
- # clojars (15)
- # clojure (86)
- # clojure-denmark (1)
- # clojure-dev (5)
- # clojure-europe (57)
- # clojure-france (145)
- # clojure-hungary (2)
- # clojure-italy (5)
- # clojure-nl (7)
- # clojure-spec (35)
- # clojure-sweden (2)
- # clojure-uk (58)
- # clojurebridge (1)
- # clojured (1)
- # clojurescript (50)
- # core-typed (9)
- # cursive (10)
- # data-science (11)
- # datascript (4)
- # datomic (25)
- # emacs (8)
- # fulcro (49)
- # graalvm (7)
- # graphql (6)
- # joker (1)
- # juxt (2)
- # kaocha (1)
- # off-topic (22)
- # other-lisps (1)
- # pathom (20)
- # re-frame (3)
- # reagent (11)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (44)
- # spacemacs (2)
- # sql (17)
- # tree-sitter (2)
- # vim (8)
- # vrac (2)
@tatut there's a couple of them mentioned here: https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md
I'm having trouble with unresolved symbols in my own macro... exclusion doesn't seem to work
my macro has its own binding form which are used in the body... I can actually give you a link example
I prefer a repro in the form:
$ clj-kondo --config '{}' --lint - <<< '(defmacro foo [])'
or
$ clj-kondo --config '{}' --lint file.clj
that's mostly where these issues happen. but that can also be repro'd in the same fashion
$ clj-kondo --config '{:linters {:unresolved-symbols {:exclude [(repro/foo)]}}}' --lint - <<< '(ns repro) (defmacro foo [bind & body] nil) (foo these should not be reported)'
<stdin>:1:27: warning: unused binding bind
<stdin>:1:34: warning: unused binding body
<stdin>:1:50: error: unresolved symbol these
<stdin>:1:56: error: unresolved symbol should
<stdin>:1:67: error: unresolved symbol be
<stdin>:1:70: error: unresolved symbol reported
linting took 13ms, errors: 4, warnings: 2
If I understand correctly, none of those symbols should be reported becaus repro/foo has been marked as excluded
$ clj-kondo --config '{:linters {:unresolved-symbol {:exclude [(repro/foo)]}}}' --lint - <<< '(ns repro) (defmacro foo [bind & body] nil) (foo these should not be reported)'
<stdin>:1:27: warning: unused binding bind
<stdin>:1:34: warning: unused binding body
linting took 10ms, errors: 0, warnings: 2
typo?I'm thinking of a --diagnose
flag for clj-kondo which lists unexpected things from the config
thanks for the help, I had a feeling it might be between keyboard and chair on this end 😛