lib/scss_lint/linter.rb in scss-lint-0.37.0 vs lib/scss_lint/linter.rb in scss-lint-0.38.0
- old
+ new
@@ -4,18 +4,22 @@
include SelectorVisitor
include Utils
attr_reader :config, :engine, :lints
+ # Create a linter.
def initialize
@lints = []
end
- # Run this linter against a parsed document with a given configuration.
+ # Run this linter against a parsed document with the given configuration,
+ # returning the lints that were found.
#
# @param engine [Engine]
# @param config [Config]
+ # @return [Array<Lint>]
def run(engine, config)
+ @lints = []
@config = config
@engine = engine
@comment_processor = ControlCommentProcessor.new(self)
visit(engine.tree)
@lints = @comment_processor.filter_lints(@lints)