clj-kondo 2026-09-08

Wow, new warning in the latest Kondo caught a real bug in some code we haven't run yet (behind a feature flag), where we clearly don't have test coverage either! Before:

photo-data (sql/get-by-id (:datasource db-spec) :shared_photo
                                      (uuid/string-to-byte-array photo-name)
                                      :photo_name)
After:
photo-data (sql/get-by-id (:datasource db-spec) :shared_photo
                                      (uuid/string-to-byte-array photo-name)
                                      :photo_name {})
The warning was that a keyword was provided where a sequable collection was expected. The bug: get-by-id with 4 args expects an opts map as the fourth argument. If you want to specify the primary key column name (`:photo_name` here), you must specify a fifth argument of the opts map. Nice job!

4
🆒 2
👀 2
🎉 8