Sha256: 71fa40a251cd9604399324bd1159b72b00788818ba67fef76eced3c41687b542

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 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 inspect(source_buffer, source, tokens, ast, comments)
          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

3 entries across 3 versions & 2 rubygems

Version Path
rubocop-0.9.1 lib/rubocop/cop/style/block_comments.rb
sabat-rubocop-0.9.0 lib/rubocop/cop/style/block_comments.rb
rubocop-0.9.0 lib/rubocop/cop/style/block_comments.rb