elvis_core
elvis_core copied to clipboard
Detect conversions from literals
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.