Sha256: 530c8772454267f8cb79737e133e2c7b84ddc7c7be604ac900d2b75d7c43c9ca
Contents?: true
Size: 847 Bytes
Versions: 3
Compression:
Stored size: 847 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 investigate(processed_source) processed_source.lines.each_with_index do |line, index| if line =~ /.*\\\z/ add_offence(:convention, source_range(processed_source.buffer, processed_source[0...index], line.length - 1, 1), MSG) end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.11.1 | lib/rubocop/cop/style/line_continuation.rb |
rubocop-0.11.0 | lib/rubocop/cop/style/line_continuation.rb |
rubocop-0.10.0 | lib/rubocop/cop/style/line_continuation.rb |