diff --git a/Library/Homebrew/rubocops/caveats.rb b/Library/Homebrew/rubocops/caveats.rb index 73922a2d31..77f5cd0ea3 100644 --- a/Library/Homebrew/rubocops/caveats.rb +++ b/Library/Homebrew/rubocops/caveats.rb @@ -48,6 +48,8 @@ module RuboCop problem "Don't use ANSI escape codes in the caveats." if regex_match_group(n, /\e/) end + return if formula_tap != "homebrew-core" + # Forbid dynamic logic in caveats (only if/else/unless) caveats_method = find_method_def(@body, :caveats) return unless caveats_method