tasks/cops_documentation.rake in rubocop-minitest-0.20.1 vs tasks/cops_documentation.rake in rubocop-minitest-0.21.0
- old
+ new
@@ -20,11 +20,11 @@
CopsDocumentationGenerator.new(departments: deps).call
end
desc 'Syntax check for the documentation comments'
task documentation_syntax_check: :yard_for_generate_documentation do
- require 'parser/ruby30'
+ require 'parser/ruby31'
ok = true
YARD::Registry.load!
cops = RuboCop::Cop::Registry.global
cops.each do |cop|
@@ -35,10 +35,10 @@
end
examples.to_a.each do |example|
buffer = Parser::Source::Buffer.new('<code>', 1)
buffer.source = example.text
- parser = Parser::Ruby30.new(RuboCop::AST::Builder.new)
+ parser = Parser::Ruby31.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}"