Sha256: e6955808d01e449b142eb0120f977c36e303aa425b91afbb7fecdd6b74757dc6

Contents?: true

Size: 338 Bytes

Versions: 4

Compression:

Stored size: 338 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    class TrailingWhitespace < Cop
      MSG = 'Trailing whitespace detected.'

      def inspect(source, tokens, ast, comments)
        source.each_with_index do |line, index|
          add_offence(:convention, index + 1, MSG) if line =~ /.*[ \t]+$/
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.8.3 lib/rubocop/cop/trailing_whitespace.rb
rubocop-0.8.2 lib/rubocop/cop/trailing_whitespace.rb
rubocop-0.8.1 lib/rubocop/cop/trailing_whitespace.rb
rubocop-0.8.0 lib/rubocop/cop/trailing_whitespace.rb