bbatsov/rubocop — pull request #1039 by jonas054 (2014-04-26 15:35:32+00:00)
Title: [Fix #974] New cop CommentIndentation

Checks that comment lines have the same indentation as the next non-blank line, except in the special cases when the next line is `end`, `else`, `}`, etc and the comment indentation shall be one step more.

This is a pretty simple solution for checking indentation of comments. It's partly based on matching code with regular expressions, which is something that we normally avoid. But since the range of things that can come right after a comment is limited, I do think it's a viable strategy in this case.