Skip to content

Commit

Permalink
Rely on requiring rubocop-ast in extension
Browse files Browse the repository at this point in the history
Extensions are loaded before the host application, and we need to ensure
we patch the class before the macros are used.
  • Loading branch information
sambostock committed Jan 29, 2024
1 parent ca0be67 commit 3c9ee4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tapioca/dsl/extensions/rubocop.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# typed: strict
# frozen_string_literal: true

return unless defined?(RuboCop::AST::NodePattern::Macros)
begin
require "rubocop-ast"
rescue LoadError
return
end

module Tapioca
module Dsl
Expand Down

0 comments on commit 3c9ee4b

Please sign in to comment.