Restrict audit to homebrew/core

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Jonathan Chang 2020-11-06 00:49:48 +11:00 committed by GitHub
parent 777dc10aa8
commit 1b95059c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,6 +668,8 @@ module RuboCop
# This cop ensures that new formulae depending on Requirements are not introduced in homebrew/core.
class CoreRequirements < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, _body_node)
return if formula_tap != "homebrew-core"
if depends_on? :java
problem "Formulae in homebrew/core should depend on a versioned `openjdk` instead of :java"
end