This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-09
Channels
- # announcements (12)
- # beginners (159)
- # boot (3)
- # calva (41)
- # cider (48)
- # clara (2)
- # clj-kondo (8)
- # cljdoc (8)
- # clojure (70)
- # clojure-dev (10)
- # clojure-europe (2)
- # clojure-losangeles (1)
- # clojure-nl (12)
- # clojure-spec (7)
- # clojure-uk (63)
- # clojurescript (24)
- # cursive (24)
- # datomic (22)
- # expound (17)
- # figwheel (1)
- # fulcro (176)
- # graphql (23)
- # jobs (9)
- # jobs-discuss (56)
- # kaocha (1)
- # mount (3)
- # nyc (1)
- # off-topic (91)
- # onyx (3)
- # overtone (4)
- # pathom (3)
- # pedestal (1)
- # re-frame (11)
- # reitit (19)
- # ring (8)
- # shadow-cljs (16)
- # test-check (5)
- # testing (2)
- # tools-deps (20)
- # vim (9)
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?
Perhaps something like this? https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave
@borkdude, I think our discussion about using your linter in Calva might have suffered the Slack history death before you read this channel?
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
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. 😃
As we’re typing - we see the linting errors
That’s the goal.
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: https://github.com/borkdude/clj-kondo/issues/145 Feel free to write down your insights there as well.
Also there is a VSCode plugin for joker: https://github.com/martinklepsch/vscode-joker-clojure-linter
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?
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.