This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-03
Channels
- # announcements (2)
- # babashka (66)
- # beginners (225)
- # braveandtrue (1)
- # calva (14)
- # circleci (1)
- # clj-kondo (36)
- # cljsrn (3)
- # clojure (423)
- # clojure-finland (7)
- # clojure-nl (1)
- # clojure-spec (14)
- # clojure-survey (41)
- # clojure-sweden (2)
- # clojure-uk (13)
- # clojurescript (59)
- # community-development (10)
- # cursive (2)
- # datascript (14)
- # datomic (63)
- # events (3)
- # expound (8)
- # figwheel-main (6)
- # kaocha (8)
- # luminus (6)
- # malli (1)
- # nrepl (2)
- # off-topic (51)
- # other-lisps (3)
- # reagent (16)
- # shadow-cljs (44)
- # spacemacs (7)
- # sql (22)
- # vrac (1)
is it possible to make clj-kondo ignore (comment)
forms entirely?
@robert-stuttaford what are things that you would like to have ignored from comment forms? I usually want comment forms (= example code) to be free of errors as well
if i can switch off through configuration, then i can produce a report of all linting errors in production code. means it's possible to have 100% clean CI report and not be concerned with developer-time comments at all
i also like it on for comments, i use it that way a lot!
if i can have that, and figure out a way to lint rum components (i want this enough to contribute it), then we basically have a perfect workflow here!
that did something; i got less output than before. digging deeper...
yeah that seems to be working great!
thank you sir. also, carve is -ing fantaaaaaastic 👏
@robert-stuttaford For rum, maybe this could work: https://github.com/borkdude/clj-kondo/issues/682
it's certainly worth a try! i'd be totally ok with clj-kondo ignoring the rum mixins and just providing the usual linting for the args and body. the issue of course is instructing clj-kondo where the args can be found, and where the body starts!
the idea of that issue is to completely ignore the bindings, just registering the fact that is defines a var, so you won't get an unresolved symbol warning
Has someone already find out what is required clj-kondo configuration for making compojure-api work with clj-kondo? Macros like this cause issues: https://github.com/metosin/compojure-api/blob/master/src/compojure/api/core.clj#L60
These macros are used like this (POST "/" request (handle-certificate-request request))
. clj-kondo will then generate following error: error: unresolved symbol request
Thanks! I used same kind of :lint-as
and :exclude
for compojure-api macros. That helped
Compojure support works for basic cases but won't support Compojure-api restructure binding forms like (GET "/:id" req :path-params [id :- s/Str] ...)
why does it say redundant form for #(do (prn %) (something %))
? pointing at #(
. i guess it's because #(do ...)
becomes (fn [] (do ...))
...
@robert-stuttaford that's probably joker? may I refer you to #joker for that?
$ clj-kondo --lint - <<< '#(do (prn %) (something %))'
<stdin>:1:15: error: unresolved symbol something
linting took 42ms, errors: 1, warnings: 0
$ /usr/local/bin/joker --lint - <<< '#(do (prn %) (something %))'
<stdin>:1:15: Parse error: Unable to resolve symbol: something
<stdin>:1:2: Parse warning: redundant do form
apologies, hard to tell where it's coming from!
you must get that a lot heh
haha i'm not fazed. having a blast linting me codes