mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
audit: Don't mutate args
This commit is contained in:
parent
cbb2e1b3dd
commit
840fbd69fb
@ -134,7 +134,6 @@ module Homebrew
|
|||||||
|
|
||||||
if only_cops
|
if only_cops
|
||||||
options[:only_cops] = only_cops
|
options[:only_cops] = only_cops
|
||||||
args.only = ["style"]
|
|
||||||
elsif args.new_formula?
|
elsif args.new_formula?
|
||||||
nil
|
nil
|
||||||
elsif strict
|
elsif strict
|
||||||
@ -151,7 +150,8 @@ module Homebrew
|
|||||||
|
|
||||||
new_formula_problem_lines = []
|
new_formula_problem_lines = []
|
||||||
ff.sort.each do |f|
|
ff.sort.each do |f|
|
||||||
options = { new_formula: new_formula, strict: strict, online: online, only: args.only, except: args.except }
|
only = only_cops ? ["style"] : args.only
|
||||||
|
options = { new_formula: new_formula, strict: strict, online: online, only: only, except: args.except }
|
||||||
options[:style_offenses] = style_results.file_offenses(f.path)
|
options[:style_offenses] = style_results.file_offenses(f.path)
|
||||||
fa = FormulaAuditor.new(f, options)
|
fa = FormulaAuditor.new(f, options)
|
||||||
fa.audit
|
fa.audit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user