This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
there is no way to declare a “vector of maps” with clj-kondo type system? seems that the collections have just type :vector
.
would be happy to emit {:op :vector :elements {:op :keys, :req {:id :int}}
for clj-kondo
the likelihood of catching these types of errors with static analysis is also rather small I'd say
Hum, I thought it used type hints as well no? Wouldn't it catch:
(def ^String foo (get-foo-from-config))
(+ 10 foo)
It could catch that, but currently it doesn't look at var types, only function return values.
Ah I see. Ya, I know no support for generic types yet. I was more commenting to the literal comment. So I guess it looks at literal and function return types for now? Which is slightly more than just literals 😛
oh, I was thinking about a :keys
thing. but #{nil {:op :keys, :req {:id :int}}}
is ok?
If someone is looking for some OSS issues to work on, here's a list: https://gist.github.com/borkdude/18af5d96c6465ce64144f03636fda3dc
I find the "feature" template a little awkward for suggesting new lints for clj-kondo. I don't know how to phrase a "problem statement" in the way it seems to suggest. Nor do I have an idea for what to put in for alternatives.
Well, it would be nice if a linting rule solves a particular problem, else it's pretty useless right? ;)