tasks/cops_documentation.rake in rubocop-minitest-0.11.1 vs tasks/cops_documentation.rake in rubocop-minitest-0.12.0
- old
+ new
@@ -44,20 +44,18 @@
break code_object.tags('example')
end
examples.to_a.each do |example|
- begin
- buffer = Parser::Source::Buffer.new('<code>', 1)
- buffer.source = example.text
- parser = Parser::Ruby25.new(RuboCop::AST::Builder.new)
- parser.diagnostics.all_errors_are_fatal = true
- parser.parse(buffer)
- rescue Parser::SyntaxError => e
- path = example.object.file
- puts "#{path}: Syntax Error in an example. #{e}"
- ok = false
- end
+ buffer = Parser::Source::Buffer.new('<code>', 1)
+ buffer.source = example.text
+ parser = Parser::Ruby25.new(RuboCop::AST::Builder.new)
+ parser.diagnostics.all_errors_are_fatal = true
+ parser.parse(buffer)
+ rescue Parser::SyntaxError => e
+ path = example.object.file
+ puts "#{path}: Syntax Error in an example. #{e}"
+ ok = false
end
end
abort unless ok
end