clojure-dev 2026-07-16

Should this be flagged by clj-kondo or not?

(str/replace 'foo-bar #"-" "_")
I think it accidentally works in the JVM, but not in CLJS, due to a .toString on the symbol, but this may be an impl detail docstring isn't explicit about what s (the first arg) should be

Feels like it should be flagged to me.

➕ 2

ns docstring says String or CharSequence anywhere a string is expected. A string is expected here.

i think s is type-hinted as CharSequence, right?

yeah this is what clj-kondo has, but it flagged some code that used a symbol :) I guess defendable

👍 1

that's pretty explicit

Same for (str/includes? :abc "b"), really discovered that an hour ago before seeing this thread.