Sha256: edc80d62dcbfb0f292895b06fdffca01aec8694b16999a2d3770d7febb3eec93
Contents?: true
Size: 502 Bytes
Versions: 2
Compression:
Stored size: 502 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 investigate(processed_source) processed_source.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.11.0 | lib/rubocop/cop/style/ascii_comments.rb |
rubocop-0.10.0 | lib/rubocop/cop/style/ascii_comments.rb |