Skip to content

Commit

Permalink
Remove description method from SpaceBeforeBrace
Browse files Browse the repository at this point in the history
The `description` method is being deprecated.

While here, also changed from appending to the `@lints` instance
variable directly to using the `add_lint` helper.

Change-Id: If2902858e2cd29c06759294c4d6357690aec6017
Reviewed-on: http://gerrit.causes.com/36725
Tested-by: jenkins <[email protected]>
Reviewed-by: Shane da Silva <[email protected]>
  • Loading branch information
sds authored and Shane da Silva committed Mar 29, 2014
1 parent 557ddb3 commit 8309f18
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/scss_lint/linter/space_before_brace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ class Linter::SpaceBeforeBrace < Linter
def visit_root(node)
engine.lines.each_with_index do |line, index|
line.scan /[^"#](?<![^ ] )\{/ do |match|
@lints << Lint.new(engine.filename, index + 1, description)
add_lint(index + 1, 'Opening curly braces ({) should be preceded by one space')
end
end
end

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

0 comments on commit 8309f18

Please sign in to comment.