This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-26
Channels
- # aleph (1)
- # announcements (9)
- # aws (6)
- # babashka (18)
- # babashka-sci-dev (25)
- # beginners (79)
- # calva (30)
- # cider (34)
- # clj-kondo (25)
- # cljsrn (6)
- # clojure (26)
- # clojure-australia (1)
- # clojure-europe (6)
- # clojure-norway (1)
- # clojure-poland (6)
- # clojure-uk (3)
- # clojured (2)
- # clojurescript (14)
- # datomic (19)
- # events (1)
- # google-cloud (1)
- # gratitude (2)
- # helix (1)
- # hyperfiddle (2)
- # interceptors (1)
- # jobs (17)
- # joyride (96)
- # leiningen (5)
- # lsp (20)
- # minecraft (2)
- # nbb (5)
- # other-languages (1)
- # re-frame (34)
- # releases (2)
- # shadow-cljs (15)
- # spacemacs (1)
- # xtdb (19)
Here is a demo of the upcoming :warn-on-reflection
linter.
https://twitter.com/borkdude/status/1529836621918502913
Feedback welcome
I just pushed a clj-kondo.hooks-api
namespace to master which should make it easier to play around with :analyze-call
hooks in the JVM REPL.
Example:
$ clj
Clojure 1.11.0
user=> (require '[clj-kondo.hooks-api :as api])
nil
user=> (def node (api/parse-string "(+ 1 2 3)"))
#'user/node
user=> (defn my-hook [{:keys [node]}] {:node (api/list-node (list* (rest (:children node))))})
#'user/my-hook
user=> (str (:node (my-hook {:node node})))
"(1 2 3)"
cc @leeOh hell yeah, this is gonna be so helpful!
ā”ļø šØ I plan to do a new clj-kondo release tomorrow morning. Please give master a spin if you're able to. šØ ā¬ ļø
hello, I'm trying to figure how to generate the kondo analisys, but having a hard time to find an example
Hi! Have you read this already? https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md
I tried to change my config but I can't see the output file, I think a complete example would be very helpful
I have questions like:
ā¢ what command will make the output be generated, its just clj-kondo --lint ...
?
ā¢ where the output file is going to be? what is its name?
oh, sorry, scrolling down I'm starting to see more complete examples, I was in a pairing session and for some reason I missed it
A basic example:
$ clj-kondo --config '{:analysis true :output {:format :edn}}' --lint - <<< '(inc 1)'
{:findings [], :summary {:error 0, :warning 0, :info 0, :type :summary, :duration 36, :files 1}, :analysis {:namespace-definitions [], :namespace-usages [], :var-definitions [], :var-usages [{:fixed-arities #{1}, :end-row 1, :name-end-col 5, :name-end-row 1, :name-row 1, :name inc, :filename "<stdin>", :from user, :col 1, :name-col 2, :end-col 8, :arity 1, :row 1, :to clojure.core}]}}
I'm trying on a project, but getting blank results:
clj-kondo --lint src --config '{:output {:format :edn}, :analysis true}'
{:findings [], :summary {:error 0, :warning 0, :info 0, :type :summary, :duration 220, :files 26}}
(also got blank on your example here, trying to bump clj-kondo to see if that fixes it)
clj-kondo --config '{:analysis true :output {:format :edn}}' --lint - <<< '(inc 1)'
{:findings [], :summary {:error 0, :warning 0, :info 0, :type :summary, :duration 10, :files 1}}
bumped to latest, still seeing blank results
ah, that works! š