rubocops/caveats: only apply dynamic logic check to core.

This doesn't really matter for non-API taps.
This commit is contained in:
Mike McQuaid 2025-06-23 08:58:34 +01:00
parent 2703f12875
commit afa5d50b36
No known key found for this signature in database

View File

@ -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