This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-03
Channels
- # announcements (11)
- # atom-editor (8)
- # aws (16)
- # babashka (34)
- # beginners (59)
- # calva (32)
- # cider (8)
- # clj-kondo (43)
- # cljs-dev (52)
- # clojure (26)
- # clojure-europe (11)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-spec (16)
- # clojure-uk (44)
- # clojurescript (5)
- # core-async (21)
- # cursive (14)
- # datomic (53)
- # figwheel-main (4)
- # fulcro (5)
- # graphql (6)
- # java (3)
- # kaocha (5)
- # leiningen (6)
- # local-first-clojure (1)
- # malli (25)
- # off-topic (40)
- # other-languages (1)
- # pathom (5)
- # pedestal (3)
- # re-frame (4)
- # reitit (2)
- # reveal (8)
- # rum (21)
- # sci (16)
- # shadow-cljs (90)
- # spacemacs (8)
- # tools-deps (10)
- # vrac (6)
- # xtdb (12)
Updated proposal regarding the above issue about ignoring warnings: https://github.com/borkdude/clj-kondo/issues/872#issuecomment-686315535
any chance of a new release soon, @borkdude? 🙂 keen to get that rum fix into general circulation here at Cognician
@robert-stuttaford The Rum fix is entirely done in user space
i'll do my homework, thanks+sorryforthenoise
No problem! I'm glad it can be done in user space, since I got another report about it: https://github.com/borkdude/clj-kondo/issues/987 Multi-arity components...
If anyone feels challenged to pick it up, be my guest, else I'll get to it after some other stuff
gosh how did i miss that 😊:face_palm:
omg omg it works yay
think of me when you have that next sponsored coffee thing, haha
I will tomorrow, thanks for sponsoring ;) Hopefully there will be a release somewhere in the middle of this month, featuring this new thing: https://github.com/borkdude/clj-kondo/issues/872#issuecomment-686315535 If you have any ideas about it, there's still time
very interesting! i don't have anything of value to add. we live with our linting errors, but clean them up as we work through old places
@borkdude do you perhaps have any guidance / writing on integrating kondo into a clojure app (e.g. a web app) to lint EDN editors inside CMSes? so basically https://clj-kondo.michielborkent.nl/ but with the server side using kondo-in-jvm-clojure instead of shelling out to the bb version?
we can't be the first ppl to do this, i'm thinking!
that front-end is shelling out to the clj-kondo binary, it has nothing to do with bb, but I get the point: shelling out.
Well, you could use clj-kondo JVM in your server and just send the lint information back to the front-end?
The source code is here: https://github.com/borkdude/clj-kondo.web
I used CodeMirror, but there are also alternatives to this. I was just familiar with that one, it has a linting plugin to display warnings
yeah super happy to use that
found the jvm api doc nice
yeah, should also be on cljdoc: https://cljdoc.org/d/clj-kondo/clj-kondo/2020.07.29/api/clj-kondo.core
@robert-stuttaford If you want something lighter weight than clj-kondo, you might also want to look at edamame
ahhh that might be all we need, because it's only EDN we need to lint
well kondo will give a list of all the linting issues right, which we can then send back for codemirror to display
user=> (require '[edamame.core :as e])
nil
user=> (e/parse-string "{")
Execution error (ExceptionInfo) at edamame.impl.parser/throw-reader (parser.cljc:89).
EOF while reading, expected } to match { at [1,1]
user=> (ex-data *e)
{:type :edamame/error, :row 1, :col 2}
we could also build that into edamame probably, I haven't really given it much thought yet
you could also use both, since you can also verify a valid EDN structure according your own rules and give extra lint warnings if it doesn't conform to your specs for example
there's also a mode to return different kinds of nodes instead of numbers and strings, so you can still have location info for those as well
There's also a docker image for clj-kondo: you might get away with using that instead of the binary on the server as well. Anyway, plenty of ideas :)
thanks dude!
@robert-stuttaford Note that you can lint strings using (with-in-str "(+ :foo)" (clj-kondo/run! {:lint ["-"]}))
sweet thank you, that's what we'll probably end up doing!