Sha256: cf2b4d192c150901ab8e3e8520bde1481b5203ef0664b121f0f3f8ea4ed90d14
Contents?: true
Size: 453 Bytes
Versions: 2
Compression:
Stored size: 453 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class LeadingCommentSpace < Cop MSG = 'Missing space after #.' def inspect(source, tokens, ast, comments) comments.each do |comment| if comment.text =~ /^#+[^#\s]/ unless comment.text.start_with?('#!') && comment.loc.line == 1 add_offence(:convention, comment.loc.line, MSG) end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.8.3 | lib/rubocop/cop/leading_comment_space.rb |
rubocop-0.8.2 | lib/rubocop/cop/leading_comment_space.rb |