Skip to content

Commit

Permalink
Use Parser::Ruby32 by default for documentation_syntax_check Rake…
Browse files Browse the repository at this point in the history
… task
  • Loading branch information
koic committed Jun 17, 2023
1 parent dbabb7d commit c2713ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/cops_documentation.rake
Original file line number Diff line number Diff line change
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/ruby31'
require 'parser/ruby32'

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::Ruby31.new(RuboCop::AST::Builder.new)
parser = Parser::Ruby32.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 c2713ae

Please sign in to comment.