Fork me on GitHub

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?


without writing a custom plugin


probably yeah, thanks!


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


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


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


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


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


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.


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


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. 😃


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.


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


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.


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


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


they both can lint stdin


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 😛


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


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


There’s an issue for VSCode integration with clj-kondo here: 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?


Eventually probably yes


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


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?


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.


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


an existing one?


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


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


Haha, I think it is an elegant solution.


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


Cool and good to know!