Fork me on GitHub
#calva
<
2019-05-09
>
borkdude11:05:54

I don’t know much about VSCode, but is it possible to execute a task (which executes a linter) on every edit of a file?

borkdude11:05:01

without writing a custom plugin

borkdude12:05:37

probably yeah, thanks!

pez12:05:21

@borkdude, I think our discussion about using your linter in Calva might have suffered the Slack history death before you read this channel?

borkdude12:05:57

oh yes, sorry. I’ve never seen that discussion

borkdude12:05:21

since the zulip-mirror-bot is here, I can read it back on zulip

pez12:05:33

We were discussing switching from the current linter (Joker), but we were unsure about what the difference in linting would be.

borkdude12:05:00

I recommend using them both. joker is more mature, but clj-kondo can catch things that joker cannot do

pez12:05:39

Joker comes with a lot of false positives and using both might make that worse?

Daniel Hines12:05:08

Could clj-kondo one day supersede Joker? It would be great to have a Clojure-based linter - would encourage more people hacking on it.

borkdude12:05:19

can you give some examples of where joker gives too many false positives? then I can judge if clj-kondo does better or worse 😉

pez12:05:24

It’s mainly about macros, since Joker can’t really know about them. So macros from any library that Joker isn’t hardcoded to handle needs to be a added to the users list of known macros. I find it a bit tedious and find myself disabling linting just to get some peace of mind. 😃

pez12:05:36

But also, when we discussed it we were of the impression that it would be trickier to lint on-type with Joker than it would be with clj-kondo. It later turned out it was mainly that clj-kondo more explicitly showed the way in its docs.

borkdude12:05:22

I’m afraid that clj-kondo has the same problem with macros. there’s also a configuration rule to disable arity linting inside certain macros, since that’s where the false positives come from

pez12:05:28

And it was lint-on-type that was the main reason for making a switch. But I’d like to know what I am trading anyway. 😃

Daniel Hines12:05:54

As we’re typing - we see the linting errors

Daniel Hines12:05:00

That’s the goal.

pez12:05:12

Yeah,on-type. I think it might have been @d4hines that brought it up?

borkdude12:05:17

yes. that should be the same with joker and clj-kondo, it behaves the same way

borkdude12:05:23

they both can lint stdin

pez12:05:48

But you had to figure it out with the joker docs not mentioning it explicitly 😃

Daniel Hines12:05:11

So, good job on the docs @borkdude 😛

borkdude12:05:38

thanks 🙂 shouldn’t enabling a linter be something orthogonal to calva? like CIDER also has nothing to do with joker

pez12:05:35

I am considering that as well. But Calva has a bit of different approach there, generally. A bit towards the zero-conf 😃

borkdude12:05:24

There’s an issue for VSCode integration with clj-kondo here: https://github.com/borkdude/clj-kondo/issues/145 Feel free to write down your insights there as well.

Daniel Hines12:05:53

From a slightly different angle - I thought the main point of Joker was to be a quick-startup Clojure interpretter (hence Go)? Since kondo is in Graal, can’t Kondo eventually fill Joker’s niche?

borkdude12:05:23

Eventually probably yes

pez12:05:38

I know about that plugin, even though haven’t checked it out.

borkdude12:05:14

Maybe calva can detect when something is a macro and when there are false positive arity errors it can add it to the config automatically?

pez12:05:29

A thing with many vscode plugins, especially Clojure ones, is that they get abandonded. So Calva has adopted three tasks that are a bit orthagonal, Paredit, Linting and Formatting. Paredit is a direct adoption of an existing plugin, even. But if we knew that we had a maintained linting extension out there I would be very happy to not have that responsibility in Calva.

pez12:05:59

That is a feature request on the Calva repo, @borkdude

borkdude12:05:15

an existing one?

pez12:05:40

Adding to config, yes. I haven’t had the time to address it though.

borkdude12:05:58

ah cool, I only thought about it now, but I’m not original 😉

pez12:05:18

Haha, I think it is an elegant solution.

borkdude12:05:09

feel free to ping me here if you have any questions regarding clj-kondo (or joker)

pez12:05:38

Cool and good to know!