audit: warn when using old-style patches
This commit is contained in:
parent
c259866517
commit
72129668f4
@ -298,8 +298,11 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
|
|
||||||
def audit_patches
|
def audit_patches
|
||||||
patches = Patch.normalize_legacy_patches(f.patches)
|
legacy_patches = Patch.normalize_legacy_patches(f.patches).grep(LegacyPatch)
|
||||||
patches.grep(LegacyPatch).each { |p| audit_patch(p) }
|
if legacy_patches.any?
|
||||||
|
problem "Use the patch DSL instead of defining a 'patches' method"
|
||||||
|
legacy_patches.each { |p| audit_patch(p) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit_patch(patch)
|
def audit_patch(patch)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user