From a720d45bd06fd27b490aa856e751de83e74322b1 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Mon, 6 Jul 2020 12:17:21 -0400 Subject: [PATCH] cleanup audit file --- Library/Homebrew/dev-cmd/audit.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index f0ddbd2965..81ae3b5026 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -231,11 +231,6 @@ module Homebrew end def audit_file - # TODO: check could be in RuboCop - if text.to_s.match?(/inreplace [^\n]* do [^\n]*\n[^\n]*\.gsub![^\n]*\n\ *end/m) - problem "'inreplace ... do' was used for a single substitution (use the non-block form instead)." - end - if formula.core_formula? && @versioned_formula unversioned_formula = begin # build this ourselves as we want e.g. homebrew/core to be present @@ -830,20 +825,6 @@ module Homebrew end end - def audit_lines - text.without_patch.split("\n").each_with_index do |line, lineno| - line_problems(line, lineno + 1) - end - end - - def line_problems(line, _lineno) - # Check for string interpolation of single values. - return unless line =~ /(system|inreplace|gsub!|change_make_var!).*[ ,]"#\{([\w.]+)\}"/ - - # TODO: check could be in RuboCop - problem "Don't need to interpolate \"#{Regexp.last_match(2)}\" with #{Regexp.last_match(1)}" - end - def audit_reverse_migration # Only enforce for new formula being re-added to core return unless @strict