module SCSSLint
  # Checks for the presence of a single space before an opening brace.
  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

module SCSSLint
  # Checks for the presence of a single space before an opening brace.
  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 ({) should be preceded by one space'
    end
  end
end

Change wording of SpaceBeforeBrace message
Change wording of SpaceBeforeBrace message

Use "should" instead of "must", which follows our convention for other
lints.

Change-Id: I187db851581ed4f2c1b76c98c7f4a73bb35308d6
Reviewed-on: http://gerrit.causes.com/36493
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>
Reviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com>
