Fork me on GitHub
#clj-kondo
<
2023-11-20
>
Ben Sless07:11:50

Is there a simple way to turn on all linters? (without a big fat config)

lispyclouds07:11:56

you mean easy way? the simple way is the big fat config :rolling_on_the_floor_laughing: (i'll excuse myself til the more useful answer comes up)

Ben Sless08:11:09

synchronicity

😆 1
borkdude08:11:54

No there isn’t (yet)

Ben Sless08:11:44

Been thinking of using clj-kondo for a gitlab code quality tool

grzm17:11:32

I'm happily using the :consistent-alias https://cljdoc.org/d/clj-kondo/clj-kondo/2023.05.18/doc/linters#consistent-alias. Is there a way to configure it for cases when I don't want something to be aliased? For example, I'd like to warn if clojure.test is being aliased rather than using :refer.

borkdude17:11:10

Not to my knowledge...

borkdude17:11:13

I could imagine a linter that warns when you are calling a var that is referring via an alias

borkdude17:11:36

like:

(:require [clojure.test :as t :refer [deftest is])

(t/deftest ...) ;; var is referred but used via alias

grzm17:11:04

Thanks for confirming that I likely haven't missed something in the documenation 🙂

grzm17:11:30

I'll see about adding something locally to catch this for us. I'm not sure it's something people would generally find useful.

borkdude17:11:51

you can scan the analysis output for qualified usages of clojure.test vars

borkdude17:11:09

with a bb script possibly

grzm17:11:08

Yup. That's what I was thinking.

grzm17:11:47

Thanks!

🎉 1