redplanetlabs / rama-clj-kondo

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

BUG - inline sets getting rewritten as lists #6

Closed nixin72 closed 4 months ago

nixin72 commented 4 months ago

Addresses #4

There's a switch on node type that makes sure the transformed contents get rewritten into the same node type as it previously was. api/set-node? was missing from this list, causing sets to fall into the default case and get rewritten as lists. Ex:

(constantly (contains? #{"x" "y" "z"} :a))

gets rewritten as

(constantly (contains? ("z" "x" "y") :a))

And this will cause a confusing linting error where it's saying that string is not a function.