Sha256: 7672cffa5f928f32bbe77d7e40721e42c6fab1d259d50823075c3262de80287b
Contents?: true
Size: 458 Bytes
Versions: 1
Compression:
Stored size: 458 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class AsciiIdentifiersAndComments < Cop ERROR_MESSAGE = 'Use only ascii symbols in identifiers and comments.' def inspect(file, source, tokens, sexp) tokens.each do |t| if [:on_ident, :on_comment].include?(t.type) && t.text =~ /[^\x00-\x7f]/ add_offence(:convention, t.pos.lineno, ERROR_MESSAGE) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.6.0 | lib/rubocop/cop/ascii_identifiers_and_comments.rb |