Fork me on GitHub
#joker
<
2019-08-29
>
borkdude18:08:01

would it be correct to say that joker uses static analysis on source code for linting? and it doesn't do any macroexpansion while linting, or does it do that?

jcburley22:08:19

I don’t know for sure, as I don’t (yet) use it for linting, but I think it is indeed only a static-analysis tool, and that it lints macro definitions but does not expand them. So (cond 1) is caught as an error (not an even number of arguments), but this is not, although it’d fail at runtime just the same:

(defmacro cond-macro
  [& args]
  `(cond [email protected]))

(cond-macro 1)

👍 4
Candid04:08:01

joker only does macroexpansion for built-in macros when linting

jcburley22:08:19

I don’t know for sure, as I don’t (yet) use it for linting, but I think it is indeed only a static-analysis tool, and that it lints macro definitions but does not expand them. So (cond 1) is caught as an error (not an even number of arguments), but this is not, although it’d fail at runtime just the same:

(defmacro cond-macro
  [& args]
  `(cond [email protected]))

(cond-macro 1)

👍 4