elvis_core icon indicating copy to clipboard operation
elvis_core copied to clipboard

Detect conversions from literals

Open igaray opened this issue 6 years ago • 0 comments

Sometimes people are lazy or are very tired and write code like this:

        maps:from_list([
            {<<"A1">>, [0, 1, 2]},
            {<<"A2">>, [0, 3]}
        ]),

Elvis could detect conversion to and from maps, lists, and possibly other data types when the argument to the conversion function is a literal value. Of course it won't stop people from assigning literal values to a variable and passing that, but nobody's perfect.

igaray avatar Jan 02 '19 18:01 igaray