Skip to content

Commit cfede01

Browse files
authored
Merge pull request #20155 from Homebrew/core-caveats
rubocops/caveats: only apply dynamic logic check to core.
2 parents 984273b + afa5d50 commit cfede01

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Library/Homebrew/rubocops/caveats.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def audit_formula(_formula_nodes)
4848
problem "Don't use ANSI escape codes in the caveats." if regex_match_group(n, /\e/)
4949
end
5050

51+
return if formula_tap != "homebrew-core"
52+
5153
# Forbid dynamic logic in caveats (only if/else/unless)
5254
caveats_method = find_method_def(@body, :caveats)
5355
return unless caveats_method

0 commit comments

Comments
 (0)