Fork me on GitHub
#clj-kondo
<
2022-07-28
>
Yehonathan Sharvit11:07:27

How do I disable the linter completely for a specific namespace?

borkdude11:07:36

@viebel Either in the namespace metadata:

(ns foo {:clj-kondo/config '{:linters {foo {:level :off}}}})
or in .clj-kondo/config.edn:
{:config-in-ns {my.namespace {:linters ...}}}

Yehonathan Sharvit11:07:50

That’s for a specific linter. I want to disable all the linters

borkdude11:07:27

Does this work?

{:config-in-ns {my.namespace ^:replace {:linters ...}}}

Yehonathan Sharvit11:07:39

What should be instead of ?

borkdude12:07:54

Never mind, that doesn't work

Yehonathan Sharvit12:07:24

Is there another option?

borkdude12:07:50

Yes, you can do:

{:output {:exclude-files ["foo"]}}

borkdude12:07:54

foo is a regex pattern

sheluchin18:07:43

What can I use to convert an argist-str->arity? So "[a b]" => 2.

borkdude18:07:38

We don't have anything in the API for this. So perhaps edn/read-string + surrounded with try/catch and count the args until & to get the fixed args

borkdude18:07:48

What are you doing with this data?

sheluchin18:07:27

I'm back to looking at this https://clojurians.slack.com/archives/CHY97NXE2/p1657652041362049 and ultimately trying to join the corresponding :var-definition's :arglist-str to a :var-usage.

sheluchin18:07:40

Maybe rewrite-clj's node API would be better than edn/read-string?

borkdude18:07:00

Perhaps. I am using edn/read-string in quickdoc

sheluchin18:07:38

I see. Here it is for https://github.com/borkdude/quickdoc/blob/a8068f1c8b13e09a2966804213fc41dd813de18e/src/quickdoc/impl.clj#L57. I'm looking at this stuff as part of my effort to make a normalized schema of the analysis data. I've decided to scale it back for now and only include functions and their calls (not all vars). I have function arities as separate records referencing their functions. So var-usages -> specific function arities -> fn definitions.

sheluchin18:07:32

Thanks for the pointer.