Fork me on GitHub
#clj-kondo
<
2020-04-03
>
celwell15:04:06

Hello, I’m having trouble getting rid of a error: #'om.next/path is private. I added :private-call {:exclude [(om.next/path)]} to my linters config, but it didn’t help

borkdude16:04:51

you don't need the parens around om.next/path

celwell16:04:04

Thanks, unfortunately I’m still receiving the error. This my entire config, the rest of it works well:

{;; example :lint-as
 :lint-as {;; om.next/defui clojure.core/defprotocol
           rum.core/defc clojure.core/defn}
 :linters
 {:unused-binding {:level :off
                   ;; :exclude-destructured-keys-in-fn-args true
                   }
  ;; :missing-docstring {:level :warning}
  :unused-namespace {:level :off}
  :unused-private-var {:level :off}
  :unresolved-symbol {:exclude [(om.next/defui)
                                (om.next/ui)
                                (om.next/factory)
                                (om.next/get-query)
                                (rum.core/defcs) ; would like to add support for this
                                render
                                goog.DEBUG]}
  :private-call {:exclude [om.next/path]}}}

borkdude16:04:58

Ah, sorry. I don't think we have a config for this linter

borkdude16:04:08

I was confused about unused-private-var

celwell16:04:28

Ah ok. Hmm… any way to completely ignore a certain function from all linting?

borkdude16:04:55

I'm afraid not, but you can refer to the private var with #'foo/bar to avoid this warning

celwell16:04:09

interesting thanks

borkdude16:04:29

maybe we should just document that in the config.md page. so you can do (def path #'om.next/path) and then use that

borkdude16:04:53

this works in JVM clojure as well

👍 4
bringe17:04:07

Hi, I'm using clj-kondo in vs code, v 2020.3.20, and seeing this "unused binding" warning when the binding is used inside a syntax-quoted form. Is this a bug? I saw a couple of similar, but not exactly the same, issues on the repo that were closed.

bringe17:04:22

I'll create a new issue, if desired

borkdude17:04:39

@brandon.ringe you're not actually using the argument unless you put a tilde before the y: ~y

❤️ 8
bringe17:04:06

Ohh I see 😅 . Thanks

rymndhng23:04:30

hey folks, I'm a bit late to the clj-kondo game (it's pretty awesome!)... I'm curious to know if this has replaced eastwood and kibit, or do folks still use all of them?

seancorfield23:04:51

@rymndhng For me, clj-kondo has replaced Joker that I used to run automatically from my editor as a linter. I only used eastwood occasionally and have only used kibit once or twice.

rymndhng23:04:51

Thanks for sharing @seanm. Something that clj-kondo really has going for me is the fast execution. On a project at work.. clj-kondo takes one second... and kibit/eastwood take minutes 🔥

seancorfield23:04:38

Joker is also very fast, which was why I was using it as a linter from my editor (linting as I type).

seancorfield23:04:52

(and also why I rarely used Eastwood/Kibit)

👍 4
seancorfield23:04:13

Plus, Borkdude is extremely responsive and helpful!

👍 8