class SCSSLint::Linter::TrailingWhitespace

Checks for trailing whitespace on a line.

Public Instance Methods

visit_root(_node) { || ... } click to toggle source
# File lib/scss_lint/linter/trailing_whitespace.rb, line 6
def visit_root(_node)
  engine.lines.each_with_index do |line, index|
    next unless line =~ /[ \t]+$/

    add_lint(index + 1, 'Line contains trailing whitespace')
  end
  yield
end