SmellDetector
It is considered good practice to annotate every class and module with a brief comment outlining its responsibilities.
Checks the given class or module for a descriptive comment.
@return [Array<SmellWarning>]
# File lib/reek/smells/irresponsible_module.rb, line 27 def examine_context(ctx) comment = Source::CodeComment.new(ctx.exp.comments) return [] if comment.is_descriptive? smell = SmellWarning.new(SMELL_CLASS, ctx.full_name, [ctx.exp.line], 'has no descriptive comment', @source, SMELL_SUBCLASS, {MODULE_NAME_KEY => ctx.exp.text_name}) [smell] end
Generated with the Darkfish Rdoc Generator 2.