lib/slim_lint/runner.rb in slim_lint-0.16.1 vs lib/slim_lint/runner.rb in slim_lint-0.17.0
- old
+ new
@@ -50,11 +50,11 @@
# @param linter_selector [SlimLint::LinterSelector]
# @param config [SlimLint::Configuration]
def collect_lints(file, linter_selector, config)
begin
document = SlimLint::Document.new(File.read(file), file: file, config: config)
- rescue SlimLint::Exceptions::ParseError => ex
- return [SlimLint::Lint.new(nil, file, ex.lineno, ex.error, :error)]
+ rescue SlimLint::Exceptions::ParseError => e
+ return [SlimLint::Lint.new(nil, file, e.lineno, e.error, :error)]
end
linter_selector.linters_for_file(file).map do |linter|
linter.run(document)
end.flatten