Skip to content

Commit 3c9ee4b

Browse files
committed
Rely on requiring rubocop-ast in extension
Extensions are loaded before the host application, and we need to ensure we patch the class before the macros are used.
1 parent ca0be67 commit 3c9ee4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/tapioca/dsl/extensions/rubocop.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# typed: strict
22
# frozen_string_literal: true
33

4-
return unless defined?(RuboCop::AST::NodePattern::Macros)
4+
begin
5+
require "rubocop-ast"
6+
rescue LoadError
7+
return
8+
end
59

610
module Tapioca
711
module Dsl

0 commit comments

Comments
 (0)