Fork me on GitHub
#clj-kondo
<
2020-12-10
>
Lone Ranger01:12:41

Hello Mr. @borkdude ! @sogaiu was kind enough to setup hooks for clj-kondo for #libpython-clj . We were having a discussion for template management via @seancorfield ‘s clj-new if it made sense to provide the clj-konda hooks with the template or if was better to let users setup and maintain their own clj-kondo hooks. The reason being, if something changes with libpython-clj in the future that would require a change in the clj-kondo definitions, I’m not sure it would be easy for us to distribute the new definitions along with the newer version. Have you encountered this problem before?

tomd10:12:35

:unsorted-required-namespaces appears to struggle with nested requires like so:

(ns foo
  (:require [charlie :as c]
            [delta
             [alpha :as a]
             [bravo :as b]]
            [echo :as e]))
alpha is marked as an unsorted namespace, which isn't really true, because the above is just a shorthand for:
(ns foo
  (:require [charlie :as c]
            [delta.alpha :as a]
            [delta.bravo :as b]
            [echo :as e]))
which isn't marked as unsorted. worth a bug issue?

borkdude10:12:59

seems like a bug. issue welcome

👍 6
borkdude10:12:11

Thanks

👍 3
borkdude10:12:09

Meanwhile you can ignore this using:

(ns foo
  #_{:clj-kondo/ignore [:unsorted-required-namespaces]}
  (:require [charlie :as c]
            [delta
             [alpha :as a]
             [bravo :as b]]
            [echo :as e]))

🆒 3
borkdude10:12:38

@helios Is this something you would like to look at since you wrote the original code?

helios10:12:56

no, sorry. don't have the time right now 🙂