DEPRECATED.rikki icon indicating copy to clipboard operation
DEPRECATED.rikki copied to clipboard

[ruby] Don't send 'for loop' feedback on 'accumulate' exercise

Open kotp opened this issue 8 years ago • 3 comments

From exercism/exercism.io#3338 requested by @armchairlinguist regarding the Ruby Accumulate exercise specifically.

Feed back from Rikki was:

Rubyists tend to prefer methods over for loops.

kotp avatar Jan 08 '17 09:01 kotp

I'm pretty sure we could make that happen.

We would need to hard-code rules in the ruby analyzer, presumably to filter out certain smells after getting the results back from the static analysis service, and before shuffling the results to grab a response.

kytrinyx avatar Jan 29 '17 06:01 kytrinyx

I changed my mind about making the ruby analyzer handle this. The ruby analyzer should be agnostic to which exercise it is, and just spit out a set of potential violations.

Rikki should be able to filter out certain rules for certain exercises.

kytrinyx avatar Apr 19 '17 16:04 kytrinyx

We've added support for passing the slug to the analyzer, so we can now update the code to ignore the for loop feedback for accumulate.

My suggestion would be to exclude the smell here if it's the accumulate exercise: https://github.com/exercism/rikki/blob/master/analysis/ruby/ruby.go#L74-L79

kytrinyx avatar May 19 '17 17:05 kytrinyx