Sha256: 203a860893aa44b17a61a06a8e721d66d2e80a9185eab4748b8b93a1c21c8c87

Contents?: true

Size: 412 Bytes

Versions: 4

Compression:

Stored size: 412 Bytes

Contents

# encoding: utf-8

# rubocop:disable SymbolName

module Rubocop
  module Cop
    class AsciiIdentifiers < Cop
      MSG = 'Use only ascii symbols in identifiers.'

      def inspect(source, tokens, ast, comments)
        tokens.each do |t|
          if t.type == :tIDENTIFIER && t.text =~ /[^\x00-\x7f]/
            add_offence(:convention, t.pos.line, MSG)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.8.3 lib/rubocop/cop/ascii_identifiers.rb
rubocop-0.8.2 lib/rubocop/cop/ascii_identifiers.rb
rubocop-0.8.1 lib/rubocop/cop/ascii_identifiers.rb
rubocop-0.8.0 lib/rubocop/cop/ascii_identifiers.rb