Fork me on GitHub
#clj-kondo
<
2019-06-27
>
jumar07:06:06

I'm getting clj-kondo-edn is not a valid syntax checker error when starting spacemacs. Does somebody know what's going on?

borkdude07:06:23

@jumar please upgrade the flycheck-clj-kondo package

jumar07:06:54

@borkdude that worked like a charm - thanks!

jumar07:06:50

btw. would it be possible to automatically check :args specs for functions or is that by definition impossible to do with clj-kondo?

borkdude07:06:38

in a limited fashion, it could be possible, e.g. when you use literals as arguments, but it only would go so far. I have an issue for this

jumar07:06:12

which one is that?

jumar07:06:31

Great, thanks for all the great work so far and super-fast support 🙂

tatut08:06:35

I guess other linters check for this so it may not be a priority, but I still find the occasional misplaced docstring in my code, would be nice to warn about that

tatut08:06:50

or more generally, superfluous discarded constant expressions

tatut08:06:03

(defn foo [bar] "misplaced docstring" ...code...)

borkdude08:06:13

@tatut I think that overlaps with this issue. feel free to add it: https://github.com/borkdude/clj-kondo/issues/259 when I'm adding the enhancement label, it will probably be implemented. I can't promise when 🙂

👍 4
tatut08:06:44

I think, the more general case isn’t overlapping… having constant expressions that are discarded

tatut08:06:52

that we know can’t be for side effects

tatut08:06:19

like (defn foo [] 1 2 3) the 1 and 2 are discarded and can’t side effect

borkdude08:06:53

missing docstring is probably something I will turn off by default, since not all people require this and it's not "wrong" to leave them out (arguably). but a misplaced docstring is something I will probably turn on by default

4
borkdude08:06:37

discarding "useless" constant values is indeed a more general topic and doesn't only concern def and defn so that deserves a separate issue

borkdude08:06:00

maybe make two different issues for those things then

tatut08:06:11

thanks for your work on clj-kondo, it has become invaluable in the short time I’ve used it 🙂

borkdude08:06:26

cool, no problem 🙂