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.57.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.57.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.56.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.55.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.54.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.53.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.52.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.51.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.50.3 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.50.2 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.50.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.50.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.49.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.48.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.47.1 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.47.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.46.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.45.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.44.0 lib/scss_lint/linter/trailing_whitespace.rb
scss_lint-0.43.2 lib/scss_lint/linter/trailing_whitespace.rb