kibit icon indicating copy to clipboard operation
kibit copied to clipboard

Don't report anonymous functions with special forms in them

Open skazhy opened this issue 10 years ago • 2 comments
trafficstars

Currently, Kibit reports that an anonymous function with a special form in it, (eg, (fn [x] (throw x)) can be shorthanded as throw. As special forms don't play by the rules, this is not working.

Kibit version: 0.1.2.

skazhy avatar Oct 12 '15 16:10 skazhy

This is a really good idea. Thanks!

danielcompton avatar Oct 12 '15 19:10 danielcompton

Also macros. It suggests:

Consider using:
  when
instead of:
  #(when %1 %2)

But if I do as it suggests, I get a compilation error: java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/when

Edit: just noticed this was already reported in #142

emlyn avatar Nov 28 '16 10:11 emlyn