Skip to content

Commit

Permalink
Merge pull request #2482 from MikeMcQuaid/audit-dependency-options
Browse files Browse the repository at this point in the history
audit: ensure default dependencies don't use options.
  • Loading branch information
MikeMcQuaid authored Apr 22, 2017
2 parents 96ea979 + 3011cba commit fdcffb2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Library/Homebrew/dev-cmd/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1031,11 +1031,15 @@ def line_problems(line, _lineno)
end

if line =~ /depends_on :tex/
problem ":tex is deprecated."
problem ":tex is deprecated"
end

if line =~ /depends_on\s+['"].+['"]\s+=>\s+:(lua|perl|python|ruby)(\d*)/
problem "Formulae should vendor #{$1} modules rather than use `depends_on ... => :#{$1}#{$2}`."
if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+:(lua|perl|python|ruby)(\d*)/
problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`"
end

if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+.*['"](.+)['"]/
problem "Dependency #{$1} should not use option #{$2}"
end

# Commented-out depends_on
Expand Down

0 comments on commit fdcffb2

Please sign in to comment.