rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
This commit is contained in:
		
							parent
							
								
									44c22dd7e3
								
							
						
					
					
						commit
						d52e870b07
					
				@ -8,10 +8,6 @@ FormulaAudit:
 | 
			
		||||
FormulaAuditStrict:
 | 
			
		||||
  Enabled: true
 | 
			
		||||
 | 
			
		||||
# disable all formulae strict audits by default
 | 
			
		||||
NewFormulaAudit:
 | 
			
		||||
  Enabled: false
 | 
			
		||||
 | 
			
		||||
# make our hashes consistent
 | 
			
		||||
Layout/HashAlignment:
 | 
			
		||||
  EnforcedHashRocketStyle: table
 | 
			
		||||
 | 
			
		||||
@ -1,4 +0,0 @@
 | 
			
		||||
inherit_from: ./.rubocop.yml
 | 
			
		||||
 | 
			
		||||
NewFormulaAudit:
 | 
			
		||||
  Enabled: true
 | 
			
		||||
@ -8,9 +8,6 @@ AllCops:
 | 
			
		||||
  Exclude:
 | 
			
		||||
    - '**/vendor/**/*'
 | 
			
		||||
 | 
			
		||||
NewFormulaAudit:
 | 
			
		||||
  Enabled: true
 | 
			
		||||
 | 
			
		||||
# Intentionally disabled as it doesn't fit with our code style.
 | 
			
		||||
RSpec/AnyInstance:
 | 
			
		||||
  Enabled: false
 | 
			
		||||
 | 
			
		||||
@ -58,8 +58,7 @@ module Homebrew
 | 
			
		||||
      options[:except_cops] = except_cops
 | 
			
		||||
    elsif only_cops.nil? && except_cops.nil?
 | 
			
		||||
      options[:except_cops] = %w[FormulaAudit
 | 
			
		||||
                                 FormulaAuditStrict
 | 
			
		||||
                                 NewFormulaAudit]
 | 
			
		||||
                                 FormulaAuditStrict]
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    Homebrew.failed = !Style.check_style_and_print(target, options)
 | 
			
		||||
 | 
			
		||||
@ -95,8 +95,6 @@ module Homebrew
 | 
			
		||||
      options[:only_cops] = only_cops
 | 
			
		||||
    elsif args.new_formula?
 | 
			
		||||
      nil
 | 
			
		||||
    elsif strict
 | 
			
		||||
      options[:except_cops] = [:NewFormulaAudit]
 | 
			
		||||
    elsif except_cops
 | 
			
		||||
      options[:except_cops] = except_cops
 | 
			
		||||
    elsif !strict
 | 
			
		||||
@ -231,12 +229,6 @@ module Homebrew
 | 
			
		||||
      return unless @style_offenses
 | 
			
		||||
 | 
			
		||||
      @style_offenses.each do |offense|
 | 
			
		||||
        if offense.cop_name.start_with?("NewFormulaAudit")
 | 
			
		||||
          next if @versioned_formula
 | 
			
		||||
 | 
			
		||||
          new_formula_problem offense.to_s(display_cop_name: @display_cop_names)
 | 
			
		||||
          next
 | 
			
		||||
        end
 | 
			
		||||
        problem offense.to_s(display_cop_name: @display_cop_names)
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
@ -46,12 +46,5 @@ module RuboCop
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Keep this (empty) module and class around in case we need it later to
 | 
			
		||||
    # avoid deleting all the NewFormulaAudit referencing logic.
 | 
			
		||||
    module NewFormulaAudit
 | 
			
		||||
      class Options < FormulaCop
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -60,7 +60,7 @@ module Homebrew
 | 
			
		||||
        config = if files.first && File.exist?("#{files.first}/spec")
 | 
			
		||||
          HOMEBREW_LIBRARY/".rubocop_rspec.yml"
 | 
			
		||||
        else
 | 
			
		||||
          HOMEBREW_LIBRARY/".rubocop_audit.yml"
 | 
			
		||||
          HOMEBREW_LIBRARY/".rubocop.yml"
 | 
			
		||||
        end
 | 
			
		||||
        args << "--config" << config
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
@ -10,13 +10,13 @@ end
 | 
			
		||||
describe "brew style" do
 | 
			
		||||
  around do |example|
 | 
			
		||||
    FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew"
 | 
			
		||||
    FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop_audit.yml"
 | 
			
		||||
    FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml"
 | 
			
		||||
    FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop_shared.yml", HOMEBREW_LIBRARY/".rubocop_shared.yml"
 | 
			
		||||
 | 
			
		||||
    example.run
 | 
			
		||||
  ensure
 | 
			
		||||
    FileUtils.rm_f HOMEBREW_LIBRARY/"Homebrew"
 | 
			
		||||
    FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_audit.yml"
 | 
			
		||||
    FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop.yml"
 | 
			
		||||
    FileUtils.rm_f HOMEBREW_LIBRARY/".rubocop_shared.yml"
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -62,7 +62,7 @@ describe "brew style" do
 | 
			
		||||
      EOS
 | 
			
		||||
      rubocop_result = Homebrew::Style.check_style_json(
 | 
			
		||||
        [formula],
 | 
			
		||||
        fix: true, only_cops: ["NewFormulaAudit/DependencyOrder"],
 | 
			
		||||
        fix: true, only_cops: ["FormulaAudit/DependencyOrder"],
 | 
			
		||||
      )
 | 
			
		||||
      offense_string = rubocop_result.file_offenses(formula.realpath).first.to_s
 | 
			
		||||
      expect(offense_string).to match(/\[Corrected\]/)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user