This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-21
Channels
- # announcements (3)
- # aws (11)
- # babashka (5)
- # beginners (116)
- # cider (30)
- # clara (1)
- # clj-kondo (15)
- # clojure (17)
- # clojure-dev (9)
- # clojure-europe (2)
- # clojure-italy (1)
- # clojure-uk (3)
- # clojurescript (9)
- # conjure (3)
- # duct (22)
- # exercism (1)
- # fulcro (8)
- # graalvm (5)
- # graphql (3)
- # helix (3)
- # joker (3)
- # kaocha (2)
- # off-topic (9)
- # pathom (4)
- # re-frame (1)
- # rum (6)
- # shadow-cljs (81)
- # sql (6)
- # xtdb (9)
Example config for the Rum library: https://github.com/borkdude/clj-kondo/tree/master/libraries/rum cc @martinklepsch @robert-stuttaford
clj-kondo v2020.06.21 introduces a new hooks API which allows writing code to support custom macros https://github.com/borkdude/clj-kondo/releases/tag/v2020.06.21 This work was sponsored by Clojurists Together as part of their Summer of Bugs program. Thanks!
Blogged about the new feature here: https://blog.michielborkent.nl/2020/06/21/clj-kondo-hooks/
@dominicm https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#tips-and-tricks
The new hooks API looks interesting! One thing that wasn't clear to me from reading the documentation was whether clj-kondo treats the auxillary files in .clj-kondo as regular namespaces? Eg. If I write my library and put its macroexpand definitons in .clj-kondo/foo.clj
, does that conflict with another library's definitions in the same foo
ns?
Wondering why this isn't namespaced the conventional way with the library name: https://github.com/borkdude/clj-kondo/blob/master/.clj-kondo/macroexpand/one_of.clj
@qythium clj-kondo doesn't execute any other files than those in .clj-kondo
and since there can only be one .clj-kondo/foo.clj
file at the same time, there isn't any conflict
Is this true even when different libraries both have their own .clj-kondo subdirectories?
Sorry, maybe I'm misunderstanding the mechanism for 3rd-party libraries to provide hooks - do they all have to be added via PR to the clj-kondo repo? And curated such that libraries/***/.clj-kondo/hooks/common-name.clj
does not conflict
and you can load that file using (require 'foo)
or refer to it from the config as foo/foo
(assuming it has a function foo
). having said that, it's a good habit to use at least two segments in a namespace