Sha256: bc01b5c06be60ba209da476d47d85cce3e019e32dc7c575e5376df6fdefa979d
Contents?: true
Size: 538 Bytes
Versions: 3
Compression:
Stored size: 538 Bytes
Contents
# encoding: utf-8 # rubocop:disable SymbolName module Rubocop module Cop module Style # This cop checks for non-ascii characters in indentifier names. class AsciiIdentifiers < Cop MSG = 'Use only ascii symbols in identifiers.' def inspect(source_buffer, source, tokens, ast, comments) tokens.each do |t| if t.type == :tIDENTIFIER && t.text =~ /[^\x00-\x7f]/ add_offence(:convention, t.pos, 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/ascii_identifiers.rb |
sabat-rubocop-0.9.0 | lib/rubocop/cop/style/ascii_identifiers.rb |
rubocop-0.9.0 | lib/rubocop/cop/style/ascii_identifiers.rb |