Fork me on GitHub
#clj-kondo
<
2020-10-12
>
viesti14:10:23

Hmm, might have found an edge case in linter for format

viesti14:10:04

from the docs at https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html > Relative indexing is used when the format specifier contains a `'<'` ('\u003c') flag which causes the argument for the previous format specifier to be re-used.

borkdude14:10:52

Nice! Feel free to post an issue. You can ignore this using #{_:clj-kondo/ignore [:format]}

👍 3
borkdude20:10:25

@viesti I now made the issue: https://github.com/borkdude/clj-kondo/issues/1042 I wonder why this feature is useful to anyone?

viesti05:10:32

yeah, probably not useful, just happened to run into it and use in my code 😄

Michael W20:10:36

What does clj-kondo mean here disambiguate?

(String. (b64/encode (.getBytes ^String "something")) "UTF-8")
Error:
Cannot disambiguate overloads of String

borkdude20:10:43

@michael819 That error isn't coming from clj-kondo, more likely from Clojure itself

borkdude20:10:18

Maybe b64/encode doesn't have a return type tag so you need to specify ^String probably (assuming it returns a string)

Michael W20:10:44

It was a byte-array thanks for the pointer on that.