gems.scss_lint-0.57.1.lib.scss_lint.linter.trailing_whitespace.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sass-maven-plugin Show documentation
Show all versions of sass-maven-plugin Show documentation
A Maven Plugin that compiles Sass files.
The newest version!
module SCSSLint
# Checks for trailing whitespace on a line.
class Linter::TrailingWhitespace < Linter
include LinterRegistry
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
end
end