lib/slim_lint/runner.rb in slim_lint-0.5.0 vs lib/slim_lint/runner.rb in slim_lint-0.6.0
- old
+ new
@@ -48,11 +48,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 Slim::Parser::SyntaxError => ex
- return [SlimLint::Lint.new(nil, file, ex.line, ex.error, :error)]
+ rescue SlimLint::Exceptions::ParseError => ex
+ return [SlimLint::Lint.new(nil, file, ex.lineno, ex.error, :error)]
end
linter_selector.linters_for_file(file).map do |linter|
linter.run(document)
end.flatten