Sha256: 4e7673c51dbe1bde819eb38a53e4b9c1e7ab62afc6841b2b649ebfeef74d2a65

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

module SCSSLint
  class Linter::SpaceBeforeBrace < Linter
    include LinterRegistry

    def visit_root(node)
      engine.lines.each_with_index do |line, index|
        line.scan /(?<![^ ] )\{$/ do |match|
          @lints << Lint.new(engine.filename, index + 1, description)
        end
      end
    end

    def description
      'Opening curly braces ({) must be preceded by one space'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
scss-lint-0.11.1 lib/scss_lint/linter/space_before_brace.rb
scss-lint-0.10.1 lib/scss_lint/linter/space_before_brace.rb
scss-lint-0.10.0 lib/scss_lint/linter/space_before_brace.rb
scss-lint-0.9.0 lib/scss_lint/linter/space_before_brace.rb