Fork me on GitHub
#clj-kondo
<
2019-10-23
>
Marc O'Morain09:10:31

> Unused private var config-compilation.yaml/whitespace-names [141, 2]

Marc O'Morain09:10:54

Should the colum here be 16, rather than 2?

(def ^:private whitespace-names
 ^2            ^16

borkdude09:10:30

it's kind of arbitrary I'd say

borkdude09:10:01

if you're trying to exclude warnings based on position, maybe only use the line number?

borkdude09:10:23

there has been a recent change to that position for ... reasons 🙂

borkdude09:10:56

if there is a strong case to change it, I'd like to hear it

borkdude09:10:39

I tried to make it consistent with joker so if you use both, you see it only in place:

$ clj-kondo --lint /tmp/foo.clj
/tmp/foo.clj:3:1: warning: Unused private var private.tmp.foo/foo
linting took 9ms, errors: 0, warnings: 1

$ joker --lint /tmp/foo.clj
/tmp/foo.clj:3:1: Parse warning: unused var foo (joker)

Marc O'Morain09:10:43

I do not have a strong case.

Marc O'Morain09:10:23

When the squiggle in VSCode is under the def, it makes me think that there is problem with the def form.

Marc O'Morain09:10:43

If the squiggle were under the var name, I would assume the problem was with the var itself.

borkdude10:10:29

ok, that sounds like a case

borkdude10:10:17

the way it works now is that the var is defined at that position, so in the export you will also have that position

borkdude10:10:30

and because the var is defined at that position, the warning also appears there

borkdude10:10:50

but that could be easily changed probably (while keeping the export the same)

borkdude10:10:10

I don't have a strong preference

borkdude22:10:43

please give it a try: https://marketplace.visualstudio.com/items?itemName=borkdude.clj-kondo this should work for users on Windows as well

sogaiu23:10:58

messages about unresolved symbols and such show up 🙂

sogaiu23:10:06

though i wonder why i get one for "alias"