lib/scss_lint/runner.rb in scss-lint-0.33.0 vs lib/scss_lint/runner.rb in scss-lint-0.34.0
- old
+ new
@@ -29,16 +29,14 @@
private
# @param file [String]
def find_lints(file)
engine = Engine.new(file)
- config = @config.preferred ? @config : Config.for_file(file)
- config ||= @config
@linters.each do |linter|
begin
- run_linter(linter, engine, config, file)
+ run_linter(linter, engine, file)
rescue => error
raise SCSSLint::Exceptions::LinterError,
"#{linter.class} raised unexpected error linting file #{file}: " \
"'#{error.message}'",
error.backtrace
@@ -50,12 +48,12 @@
rescue FileEncodingError => ex
@lints << Lint.new(nil, file, Location.new, ex.to_s, :error)
end
# For stubbing in tests.
- def run_linter(linter, engine, config, file)
- return unless config.linter_enabled?(linter)
- return if config.excluded_file_for_linter?(file, linter)
- linter.run(engine, config.linter_options(linter))
+ def run_linter(linter, engine, file)
+ return unless @config.linter_enabled?(linter)
+ return if @config.excluded_file_for_linter?(file, linter)
+ linter.run(engine, @config.linter_options(linter))
end
end
end