dev-cmd/audit: don't audit every tap with given named packages
This commit is contained in:
		
							parent
							
								
									a5a728a4df
								
							
						
					
					
						commit
						367f716a08
					
				@ -174,8 +174,10 @@ module Homebrew
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Run tap audits first
 | 
					    # Run tap audits first
 | 
				
			||||||
 | 
					    named_arg_taps = [*audit_formulae, *audit_casks].map(&:tap).uniq if !args.tap && !no_named_args
 | 
				
			||||||
    tap_problems = Tap.each_with_object({}) do |tap, problems|
 | 
					    tap_problems = Tap.each_with_object({}) do |tap, problems|
 | 
				
			||||||
      next if args.tap && tap != args.tap
 | 
					      next if args.tap && tap != args.tap
 | 
				
			||||||
 | 
					      next if named_arg_taps&.exclude?(tap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ta = TapAuditor.new(tap, strict: args.strict?)
 | 
					      ta = TapAuditor.new(tap, strict: args.strict?)
 | 
				
			||||||
      ta.audit
 | 
					      ta.audit
 | 
				
			||||||
 | 
				
			|||||||
@ -227,9 +227,9 @@ module Homebrew
 | 
				
			|||||||
      if args.no_audit?
 | 
					      if args.no_audit?
 | 
				
			||||||
        ohai "Skipping `brew audit`"
 | 
					        ohai "Skipping `brew audit`"
 | 
				
			||||||
      elsif args.online?
 | 
					      elsif args.online?
 | 
				
			||||||
        ohai "brew audit --cask --online #{cask.sourcefile_path.basename}"
 | 
					        ohai "brew audit --cask --online #{cask.full_name}"
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        ohai "brew audit --cask #{cask.sourcefile_path.basename}"
 | 
					        ohai "brew audit --cask #{cask.full_name}"
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      return
 | 
					      return
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user