r-cochran / cuke_sniffer

A ruby library used to root out smells in your cukes.
MIT License
44 stars 28 forks source link

Comments not allowed on Step Definitions #79

Open snowe2010 opened 9 years ago

snowe2010 commented 9 years ago

IntelliJ nicely shows comments on steps from a feature file with a shortcut, yet if I add comments to the steps like so

# This step does stuff
# @param hsh [Hash] a hash
# @return stuff
When(/I do stuff/) do 
end

I get a cuke_sniffer warning, Commented code in Step Definition. when in fact it is not code that is commented at all.

vaughncm commented 9 years ago

This is a very good discussion point. The decision around this rule came about because we, the original authors, come from the camp of making code expressive enough to make comments unnecessary. Comments in the gem were unfortunately a necessity because of rdoc's implementation that we accepted. You should have the ability to disable this rule if your team finds prefers having comments provided as part of your step definition conventions.