Fork me on GitHub
#clj-kondo
<
2023-01-13
>
pmooser16:01:33

I've just started using clojure-lsp, which uses clj-kondo for its linting ... and I've noticed it will emit warnings and errors for code inside of comment blocks. Is there any way to disable this globally? I tend to use comment blocks for certain kinds of examples and seeing a bunch of warnings about unused vars is a little distracting.

borkdude16:01:09

@U07VBK5CJ I recommend using :config-in-comment to disable some, but not all linters

pmooser16:01:55

Ok, but I am still impressed that the option already exists! I will take a look. Thank you both for the replies !

robert-stuttaford16:01:32

:config-in-comment {:linters {:unresolved-namespace         {:level :off}
                               :unresolved-symbol            {:level :off}
                               :unresolved-var               {:level :off}
                               :duplicate-require            {:level :off}
                               :unsorted-required-namespaces {:level :off}
                               :unused-namespace             {:level :off}
                               :unused-binding               {:level :off}}}
we use 'rich comments' extensively, this is our kondo config