This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-09
Channels
- # announcements (28)
- # babashka (8)
- # bangalore-clj (1)
- # beginners (123)
- # boot (1)
- # bristol-clojurians (1)
- # calva (3)
- # cider (30)
- # clj-kondo (42)
- # cljs-dev (5)
- # clojure (260)
- # clojure-dev (11)
- # clojure-europe (7)
- # clojure-india (1)
- # clojure-italy (2)
- # clojure-losangeles (5)
- # clojure-nl (5)
- # clojure-portugal (15)
- # clojure-uk (51)
- # clojurescript (69)
- # cursive (6)
- # data-science (21)
- # datascript (17)
- # datomic (1)
- # emacs (29)
- # figwheel-main (11)
- # fulcro (89)
- # graphql (5)
- # hoplon (2)
- # hugsql (6)
- # jobs (11)
- # juxt (1)
- # leiningen (7)
- # luminus (1)
- # malli (3)
- # off-topic (64)
- # pathom (32)
- # project-updates (1)
- # re-frame (9)
- # reagent (10)
- # reitit (21)
- # ring (5)
- # ring-swagger (1)
- # shadow-cljs (8)
- # spacemacs (6)
- # xtdb (4)
would it be possible for clj-kondo to lint function arguments? eg. (update m k f x)
would be an error if f
did not take 2 args or x
was the wrong type
I need to use a private var on a library, can clj-kondo ignore the error only for a specific var?
Maybe you can do it in the namespace metadata? Not sure if it works for that specific linter
this seems to work:
(ns foo "foo docs"
{:clj-kondo/config '{:linters {:private-call {:level :off}}}})
(clojure.core/is-annotation? 1)
the linter should actually be renamed to :private-var
since it should also report usages of private vars. I'll make an issue for that
Do I have to use the docstring? I tried without it and it didn't work. Not sure if it makes a difference but the variable I'm using is created by defprotocol.
This works:
(ns bar)
(deftype ^:private Foo [])
(ns foo
{:clj-kondo/config '{:linters {:private-call {:level :off}}}}
(:require [bar]))
(clojure.core/is-annotation? 1)
(bar/Foo)
clj-kondo just always expects a quoted value there because most of the time there are symbols in there
Anyone faced getting clj-kondo
linter error: unresolved symbol
for symbols used in a clj comment
macro?
I tried both :exclude
on (comment)
and (clojure.core/comment)
, but doesn’t seem to fix it
@mikerod By default clj-kondo will lint comments as if it's "real" code, because often that's useful during experimentation. But you can turn it off using :skip-comments true
https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#ignore-the-contents-of-comment-forms
oh interesting. I was on that doc page, but didn’t expect it to be a separate option like that