This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-05
Channels
- # adventofcode (95)
- # announcements (3)
- # babashka (11)
- # beginners (39)
- # boot (19)
- # bristol-clojurians (1)
- # cider (32)
- # clj-kondo (39)
- # cljsrn (8)
- # clojure (156)
- # clojure-dev (35)
- # clojure-europe (4)
- # clojure-italy (15)
- # clojure-nl (28)
- # clojure-spec (43)
- # clojure-uk (153)
- # clojurescript (168)
- # core-async (13)
- # core-logic (11)
- # cryogen (4)
- # cursive (13)
- # datomic (26)
- # duct (3)
- # emacs (8)
- # fulcro (33)
- # garden (4)
- # graalvm (18)
- # graphql (4)
- # jobs-discuss (2)
- # kaocha (1)
- # leiningen (3)
- # malli (8)
- # off-topic (1)
- # pathom (7)
- # re-frame (21)
- # reagent (3)
- # rewrite-clj (1)
- # schema (4)
- # shadow-cljs (40)
- # sql (2)
- # uncomplicate (3)
I just hooked up the analysis to my code formatter. We've got some very cool things going on here... I'm able to accurately match defn.
(with-in-str "(ns foo)"
(:analysis
(kondo/run!
{:lint ["-"]
:config {:output {:analysis true}}})))
;; =>
{:namespace-definitions [{:filename "<stdin>", :row 1, :col 1, :name foo}],
:namespace-usages [],
:var-definitions [],
:var-usages []}
the call might have some more detail to it, like the amount of arguments (which is pretty useless information for the ns macro probably)
and the namespace it was called from, but maybe that hints at the reason why it wasn't there in the first place
It's useful to me for identifying what it is. Not some other ns, the one and true ns.
That's fine contextually :) all I need to know is whether the symbol is clojure.core/ns or not
No, that's what I reported yesterday...? I can derive the require once I'm inside ns, because that is contextual information