clj-commons / kibit

There's a function for that!
1.76k stars 135 forks source link

Wrong suggestion for `(fn [x] [x x])` #248

Open or opened 2 years ago

or commented 2 years ago

Howdy! I ran into this:

(map (fn [x] [x x]) [1 2 3 4])

will result in this advice:

Consider using:
  x
instead of:
  (fn [x] [x x])

I'm not sure which rule it is trying to apply here.

replomancer commented 2 years ago

Hello :wave: ~It looks like yet another form of https://github.com/jonase/kibit/issues/49~ My bad. I can't actually tell if it's related.