Closed troessner closed 9 years ago
Is there actually any external use for these extra parameters? Why would smell class, source, context, lines, and message not be enough information?
Is there actually any external use for these extra parameters?
AFAIS -> no.
Why would smell class, source, context, lines, and message not be enough information?
Can't think of any reason as well. I'll whip up a PR for further discussion.
Addendum: I believe that those constants were only introduced for spec'ing reasons and / or the reek matchers. And I do agree that doing something like https://github.com/troessner/reek/blob/master/spec/reek/smells/data_clump_spec.rb#L153 is quite handy. But I believe that we still can get rid of all those constants by just using a couple of standard keys. E.g. "name" and "count" would already be enough for > 90% of all current smells and the remaining 10% can be handled with 2 or 3 more keys. I'll start out with a PR and then let's see where this leads us.:)
fyi, will start to work on this next week in combination with https://github.com/troessner/reek/issues/330 since this will imply a major spec overhaul as well (at least for the specs for smells/ )
Extracted from here: #328
Getting rid of the gazillions of constants for the parameter keys that are floating around in almost every smell detector and that used and spread across our spec suite