Sha256: 34b4a3cf7c10b9f67dc4b9266730d6c9693c659f017d3f9d02f467854c774a72

Contents?: true

Size: 408 Bytes

Versions: 3

Compression:

Stored size: 408 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    class Semicolon < Cop
      ERROR_MESSAGE = 'Do not use semicolons to terminate expressions.'

      def inspect(file, source, tokens, sexp)
        tokens.each_index do |ix|
          t = tokens[ix]
          if t.type == :on_semicolon
            add_offence(:convention, t.pos.lineno, ERROR_MESSAGE)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubocop-0.6.1 lib/rubocop/cop/semicolon.rb
rubocop-0.6.0 lib/rubocop/cop/semicolon.rb
rubocop-0.5.0 lib/rubocop/cop/semicolon.rb