Reek (6.1.4) does not report any smells for the following code:
class ExampleClass
# :reek:LongParameterList
private def some_method(first, second, third, fourth, fifth)
p 1
end
end
however, after adding a comment at the end of the method, the suppression seems to no longer work and reek reports the LongParameterList smell:
class ExampleClass
# :reek:LongParameterList
private def some_method(first, second, third, fourth, fifth)
p 1
# content of this comment doesn't seem to matter
end
end
interestingly, removing the class seems to also cause the issue to stop (the smell is suppressed) despite the comment remaining:
# :reek:LongParameterList
private def some_method(first, second, third, fourth, fifth)
p 1
# content of this comment doesn't seem to matter
end
also it appears that adding another method before some_method causes the suppression to break again:
def foo
end
# :reek:LongParameterList
private def some_method(first, second, third, fourth, fifth)
p 1
# content of this comment doesn't seem to matter
end
Reproduction
To reproduce, set up files one.rb, two.rb, three.rb, four.rb with contents of the above four snippets. Then this is the output from reek, along with related ruby/gem versions:
Reek (6.1.4) does not report any smells for the following code:
however, after adding a comment at the end of the method, the suppression seems to no longer work and reek reports the LongParameterList smell:
interestingly, removing the class seems to also cause the issue to stop (the smell is suppressed) despite the comment remaining:
also it appears that adding another method before
some_method
causes the suppression to break again:Reproduction
To reproduce, set up files one.rb, two.rb, three.rb, four.rb with contents of the above four snippets. Then this is the output from reek, along with related ruby/gem versions: