Fork me on GitHub
#clj-kondo
<
2021-11-20
>
Noah Bogart02:11:41

i would prefer to have them be automatic

Adam Helins17:11:50

(not (empty? ...))  issues a warning (use `seq` idiom instead) However, when this is the last form in a function for instance, the result is not the same (returning a boolean vs ?seq) I would suggest issuing this warning only when used in a conditional (`if` and friends) 🙂 (edited)

borkdude17:11:04

or suggest (boolean (seq ...)) ;)

☝️ 1
borkdude17:11:38

I don't know, clj-kondo just reflects what's in the docstring of empty?, empty? doesn't suggest the context of a condition

Adam Helins17:11:46

Yep or just disable that linter since it's not super crucial

borkdude17:11:48

as you see fit

borkdude17:11:23

you can also locally ignore it with #_:clj-kondo/ignore

Adam Helins17:11:50

Ah, is that new? I don't remember reading about that

borkdude17:11:54

it's been there for a while