Sha256: 4de75b87ab984426d9d7ee06ee5d37154e9e8dd5175a06c96214249366816adb
Contents?: true
Size: 415 Bytes
Versions: 22
Compression:
Stored size: 415 Bytes
Contents
module SlimLint # Checks for trailing whitespace. class Linter::TrailingWhitespace < Linter include LinterRegistry on_start do |_sexp| dummy_node = Struct.new(:line) document.source_lines.each_with_index do |line, index| next unless line =~ /\s+$/ report_lint(dummy_node.new(index + 1), 'Line contains trailing whitespace') end end end end
Version data entries
22 entries across 22 versions & 1 rubygems