Fork me on GitHub
#clj-kondo
<
2023-12-08
>
hifumi12301:12:09

clj-kondo version 2023.10.21-SNAPSHOT does not seem to support ignoring the :line-length linter. For a quick demonstration, use the following configuration

{:linters {:line-length {:max-line-length 80}}}
Then try linting the following namespace
(ns example)

#_{:clj-kondo/ignore [:line-length]}
(def example "this line of code exceeds 80 characters but shouldn't cause warning")

borkdude07:12:01

can you create an issue?

hifumi12307:12:35

I don’t have a GitHub account, sorry. I’ve attached a repro using the contents of my post above. It suffices to extract this into a folder then run lein clj-kondo --lint example.clj. The output is

example.clj:4:81: warning: Line is longer than 80 characters.
linting took 47ms, errors: 0, warnings: 1

valerauko07:12:13

I've found where I can add support for :flds, but I can't seem to find how to branch depending on the runtime. analyzer.clj isn't cljc so I can't just add conditionals using that. What would be the ideal way? https://github.com/clj-kondo/clj-kondo/issues/2227

valerauko07:12:55

If there is a constants.cljc somewhere I could add supported-destructuring-shorthands there but I don't think there is one

valerauko13:12:22

Awesome! I won't be able to commit any code until the third week of January (super busy moving flats), but if you can point me the direction to read in the codebase / research, I'll be sure to do my homework