Skip to content

Commit

Permalink
Remove description method from abstract Linter
Browse files Browse the repository at this point in the history
We don't want linter subclasses to be implementing this method as a
means of defining a default message, since it somewhat obfuscates where
the message comes from.

Remove it now that all references to `description` have been removed.

Change-Id: I0360927b3e72067136654d177980a4ee279fb8d0
Reviewed-on: http://gerrit.causes.com/36727
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 5c3ab02 commit eb06d57
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/scss_lint/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,16 @@ def run(engine, config)
visit(engine.tree)
end

# Define if you want a default message for your linter
# @return [String, nil]
def description
nil
end

# Helper for creating lint from a parse tree node
#
# @param node_or_line [Sass::Script::Tree::Node, Sass::Engine::Line]
# @param message [String, nil]
def add_lint(node_or_line, message = nil)
# @param message [String]
def add_lint(node_or_line, message)
line = node_or_line.respond_to?(:line) ? node_or_line.line : node_or_line

@lints << Lint.new(engine.filename,
line,
message || description)
message)
end

# @param source_position [Sass::Source::Position]
Expand Down

0 comments on commit eb06d57

Please sign in to comment.