Merge pull request #2627 from MikeMcQuaid/audit-fix-option-detection
audit: fix dependency option detection.
This commit is contained in:
		
						commit
						75d230318a
					
				@ -1052,8 +1052,12 @@ class FormulaAuditor
 | 
				
			|||||||
      problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`"
 | 
					      problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`"
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+.*(?<!\?[( ])['"](.+)['"]/
 | 
					    if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+(.*)/
 | 
				
			||||||
      problem "Dependency #{$1} should not use option #{$2}"
 | 
					      dep = $1
 | 
				
			||||||
 | 
					      $2.split(" ").map do |o|
 | 
				
			||||||
 | 
					        next unless o =~ /^\[?['"](.*)['"]/
 | 
				
			||||||
 | 
					        problem "Dependency #{dep} should not use option #{$1}"
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Commented-out depends_on
 | 
					    # Commented-out depends_on
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user