Skip to content

Commit

Permalink
Use Ruby 3.1 parser for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jul 23, 2022
1 parent 36f0224 commit ae124b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/cops_documentation.rake
Expand Up @@ -22,7 +22,7 @@ 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!
Expand All @@ -37,7 +37,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do
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
Expand Down

0 comments on commit ae124b9

Please sign in to comment.