Sha256: 119271ad13120ab90e5cf7cf48c096a6636ad38fe44b63df02be7c1416ef6e5c

Contents?: true

Size: 356 Bytes

Versions: 28

Compression:

Stored size: 356 Bytes

Contents

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
scss_lint-0.43.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.43.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.42.2 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.42.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.42.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.41.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.40.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.40.0 lib/scss_lint/linter/trailing_whitespace.rb