Fork me on GitHub
#clj-kondo
<
2022-05-27
>
borkdude10:05:03

clj-kondo v2022.05.27

πŸŽ‰ 5
dpsutton15:05:20

just upgraded clj-kondo and not seeing line numbers in lots of lint warnings. Details in thread

πŸ‘€ 1
dpsutton15:05:27

clj-kondo --lint src:shared/src
src/metabase/api/activity.clj::: warning: redundant do
src/metabase/api/alert.clj::: warning: redundant do
src/metabase/api/automagic_dashboards.clj::: warning: redundant do
src/metabase/api/bookmark.clj::: warning: redundant do
src/metabase/api/card.clj::: warning: redundant do
src/metabase/api/collection.clj::: warning: redundant do
src/metabase/api/dashboard.clj::: warning: redundant do
src/metabase/api/database.clj::: warning: redundant do
src/metabase/api/dataset.clj::: warning: Redundant let expression.
src/metabase/api/dataset.clj::: warning: redundant do
src/metabase/api/dataset.clj:67:7: warning: Redundant expression: nil
src/metabase/api/dataset.clj:164:5: warning: Redundant expression: nil

dpsutton15:05:58

these redundant do’s seem new and give no indication where they are from. perhaps some macro or hook but it’d still be nice to have some indication of where they start

dpsutton15:05:12

redundant expression: nil seems strange but at least it has a line number

borkdude15:05:36

I'll take a look later

borkdude15:05:10

I changed the hooks API and thought I improved things but I might have screwed up something

borkdude16:05:36

ok, going to look now

πŸ‘ 1
borkdude18:05:16

Releasing a fix now

lread20:05:09

Let that be a lesson! Never ask me to help review a PR again. simple_smile

❀️ 2
dpsutton20:05:35

bugs get through πŸ™‚ and two sets of eyes are always better

dpsutton20:05:38

and it appears fixed on our codebase. thanks all!

πŸŽ‰ 1
ambrosebs22:05:15

Just bumped a really old clj-kondo dep and the def + fn linter caught some bugs. thanks @borkdude! https://github.com/clj-kondo/clj-kondo/issues/1410

πŸŽ‰ 2
snoe22:05:19

Is there a linter for using a fn without calling it in the left side of a cond or cond-> like (defn add-secret? [] ...) (cond-> {} add-secret? (assoc :secret "oops"))

☝️ 1
borkdude08:05:53

Currently not, but issue + PR welcome