redplanetlabs / rama-clj-kondo

clj-kondo hooks for Rama code
Apache License 2.0
11 stars 0 forks source link

Wrap bodied of <<if in a <<do #3

Closed nixin72 closed 8 months ago

nixin72 commented 8 months ago
(<<if x 
  (prn 1)
  (prn 2)
 (else>)
  (prn 3))

was expanding to

(if x 
  (prn 1) 
  (prn 2) 
  (prn 3))

Instead of

(if x 
  (do (prn 1)
      (prn 2))
  (prn 3))

Leading to errors there was something besides a binding form at the first form in an <<if branch. This fixes it so that the branches of <<if are wrapped in a <<do.