Sha256: 7fcd3ffd4a355aa20fe3cf29349d62902b72c7deaec3a70da338c8480aeba80d
Contents?: true
Size: 796 Bytes
Versions: 3
Compression:
Stored size: 796 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Style # This cop checks for uses of the line continuation character. # # This check has to be refined or retired, since it doesn't make a lot # of sense without inspection of its context. class LineContinuation < Cop MSG = 'Avoid the use of the line continuation character(\).' def inspect(source_buffer, source, tokens, ast, comments) source.each_with_index do |line, index| if line =~ /.*\\\z/ add_offence(:convention, source_range(source_buffer, source[0...index], line.length - 1, 1), 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/line_continuation.rb |
sabat-rubocop-0.9.0 | lib/rubocop/cop/style/line_continuation.rb |
rubocop-0.9.0 | lib/rubocop/cop/style/line_continuation.rb |