lib/scss_lint/runner.rb in scss_lint-0.55.0 vs lib/scss_lint/runner.rb in scss_lint-0.56.0
- old
+ new
@@ -31,21 +31,21 @@
engine = Engine.new(options)
@linters.each do |linter|
begin
run_linter(linter, engine, file[:path])
- rescue => error
+ rescue StandardError => error
raise SCSSLint::Exceptions::LinterError,
"#{linter.class} raised unexpected error linting file #{file[:path]}: " \
"'#{error.message}'",
error.backtrace
end
end
rescue Sass::SyntaxError => ex
- @lints << Lint.new(nil, ex.sass_filename, Location.new(ex.sass_line),
+ @lints << Lint.new(Linter::Syntax.new, ex.sass_filename, Location.new(ex.sass_line),
"Syntax Error: #{ex}", :error)
rescue FileEncodingError => ex
- @lints << Lint.new(nil, file[:path], Location.new, ex.to_s, :error)
+ @lints << Lint.new(Linter::Encoding.new, file[:path], Location.new, ex.to_s, :error)
end
# For stubbing in tests.
def run_linter(linter, engine, file_path)
return if @config.excluded_file_for_linter?(file_path, linter)