clj-kondo

https://github.com/clj-kondo/clj-kondo
unbalanced 2020-12-10T01:53:41.104300Z

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?

tomd 2020-12-10T10:31:35.105100Z

: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?

borkdude 2020-12-10T10:32:59.105400Z

seems like a bug. issue welcome

šŸ‘ 2
borkdude 2020-12-10T10:34:09.105900Z

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]))

šŸ†’ 1
borkdude 2020-12-10T10:34:38.106400Z

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

borkdude 2020-12-10T10:45:11.107100Z

Thanks

šŸ‘ 1
helios 2020-12-10T10:47:56.107400Z

no, sorry. don't have the time right now šŸ™‚