Sha256: e5857b1016025a4df00fdc82e6be493afe7f7a0ca319b93659723c73855e79c4
Contents?: true
Size: 509 Bytes
Versions: 3
Compression:
Stored size: 509 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Style # This cop checks for non-ascii (non-English) characters # in comments. class AsciiComments < Cop MSG = 'Use only ascii symbols in comments.' def inspect(source_buffer, source, tokens, ast, comments) comments.each do |comment| if comment.text =~ /[^\x00-\x7f]/ 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/ascii_comments.rb |
sabat-rubocop-0.9.0 | lib/rubocop/cop/style/ascii_comments.rb |
rubocop-0.9.0 | lib/rubocop/cop/style/ascii_comments.rb |