Sha256: 27843a82c27c0aa2b87bb802d8c01d4bc136ad6e2a46d358619601574863857d

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    module Style
      # This cop looks for uses of block comments (=begin...=end).
      class BlockComments < Cop
        MSG = 'Do not use block comments.'

        def investigate(processed_source)
          processed_source.comments.each do |comment|
            if comment.text.start_with?('=begin')
              add_offence(:convention, comment.loc, MSG)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.11.0 lib/rubocop/cop/style/block_comments.rb
rubocop-0.10.0 lib/rubocop/cop/style/block_comments.rb