Skip to content

Commit

Permalink
Update rake example task to use ruby 2.5 parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Feb 24, 2022
1 parent 1c08723 commit 6d92d87
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 @@ -91,7 +91,7 @@ begin

desc 'Syntax check for the documentation comments'
task documentation_syntax_check: :yard_for_generate_documentation do
require 'parser/ruby24'
require 'parser/ruby25'

ok = true
YARD::Registry.load!
Expand All @@ -106,7 +106,7 @@ begin
examples.to_a.each do |example|
buffer = Parser::Source::Buffer.new('<code>', 1)
buffer.source = example.text
parser = Parser::Ruby24.new(RuboCop::AST::Builder.new)
parser = Parser::Ruby25.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 6d92d87

Please sign in to comment.