Fork me on GitHub
#clj-kondo
<
2020-04-08
>
sogaiu00:04:25

i just had luck building and running clj-kondo for aarch64 🙂

sogaiu00:04:33

i'm off to try babashka

eskos07:04:29

What would be the correct approach to make a custom linting rule which would disallow using :refer in ns requires? This is a sort of in-house rule we have to keep things legible, and would be nice to get clj-kondo to warn about those 🙂

borkdude07:04:19

you always want to use aliases or fully qualified namespaces?

eskos08:04:02

Always :as something 🙂

eskos08:04:17

Oh and this also means no :refer-macros as well, if that wasn’t obvious yet…

borkdude08:04:31

@suomi.esko We don't have any API to make custom linters, but since this kind of rule isn't specific to any one code base, I suggest we bake this into clj-kondo as an optional linter. we already have: :use {:level :warning}. we could make one for :refer as well.

eskos09:04:26

I’d love that 🙂

borkdude09:04:56

ok, could you post an issue?

eskos09:04:46

That I can! 😄 A moment.

plins13:04:11

hello, Im running clj-kondo —lint . on a clojure project and Im getting this error

./src/y/x/goal/core.clj:3:37: warning: #'integrant.repl/clear is referred but never used
./src/y/x/goal/core.clj:3:43: warning: #'integrant.repl/go is referred but never used
./src/y/x/goal/core.clj:3:46: warning: #'integrant.repl/halt is referred but never used
./src/y/x/goal/core.clj:3:51: warning: #'integrant.repl/prep is referred but never used
./src/y/x/goal/core.clj:3:56: warning: #'integrant.repl/init is referred but never used
./src/y/x/goal/core.clj:3:61: warning: #'integrant.repl/reset is referred but never used
./src/y/x/goal/core.clj:3:67: warning: #'integrant.repl/reset-all is referred but never used
but there is no explicit reference to integrant whatsoever in the file, here is the require block (it says line 3 right?)
(ns dojo.y.x.core
  (:require [clojure.spec.alpha :as s]
            [y.x.common.spec :as cs]
            [y.x.onboarding.core :as onboarding]
            [y.x.settings.user :as user]
            [y.x.team.core :as team]
            [y.helper.math :as math]
            [y.helper.time :as time]
            [y.integration.db.core :as db]
            [y.integration.http.ff-gg :as asc]
            [taoensso.timbre :as log]))

borkdude14:04:45

@plins which version of clj-kondo are you using? and this is a public repo so I can reproduce the problem?

plins15:04:51

clj-kondo v2020.04.05

plins15:04:10

not a public repo, Ill try to nail down the problem to a small reproducible version thanks 🙂

borkdude15:04:49

@plins fwiw the filenames reported do not match the namespace form you posted

plins15:04:18

my mistake, but I edited those in slack just to do not post private stuff sorry

borkdude15:04:52

ok, I'm going to wait for the repro