Merge pull request #4033 from MikeMcQuaid/audit-depend-if-build-with
audit (strict): check for build.with? dependencies.
This commit is contained in:
		
						commit
						b584e24ad1
					
				@ -736,6 +736,10 @@ class FormulaAuditor
 | 
			
		||||
      problem "Use \#{pkgshare} instead of \#{share}/#{formula.name}"
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    if line =~ /depends_on .+ if build\.with(out)?\?\(?["']\w+["']\)?/
 | 
			
		||||
      problem "`Use :optional` or `:recommended` instead of `#{Regexp.last_match(0)}`"
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    return unless line =~ %r{share(\s*[/+]\s*)(['"])#{Regexp.escape(formula.name)}(?:\2|/)}
 | 
			
		||||
    problem "Use pkgshare instead of (share#{Regexp.last_match(1)}\"#{formula.name}\")"
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user