From a92e1eda27d732e0de75592d8fb52e93bb5e0d33 Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Mon, 7 Aug 2017 14:08:22 +0530 Subject: audit: Port rules from line_problems to rubocop part 4(WIP) --- Library/Homebrew/dev-cmd/audit.rb | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 80b9824aa..db99656cb 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -927,15 +927,6 @@ class FormulaAuditor problem "Use MacOS.full_version instead of MACOS_FULL_VERSION" end - cats = %w[leopard snow_leopard lion mountain_lion].join("|") - if line =~ /MacOS\.(?:#{cats})\?/ - problem "\"#{$&}\" is deprecated, use a comparison to MacOS.version instead" - end - - if line =~ /depends_on [A-Z][\w:]+\.new$/ - problem "`depends_on` can take requirement classes instead of instances" - end - if line =~ /^def (\w+).*$/ problem "Define method #{Regexp.last_match(1).inspect} in the class body, not at the top-level" end @@ -956,20 +947,6 @@ class FormulaAuditor conditional_dep_problems(Regexp.last_match(1), Regexp.last_match(2), $&) end - if line =~ /(Dir\[("[^\*{},]+")\])/ - problem "#{Regexp.last_match(1)} is unnecessary; just use #{Regexp.last_match(2)}" - end - - if line =~ /system (["'](#{FILEUTILS_METHODS})["' ])/o - system = Regexp.last_match(1) - method = Regexp.last_match(2) - problem "Use the `#{method}` Ruby method instead of `system #{system}`" - end - - if line =~ /assert [^!]+\.include?/ - problem "Use `assert_match` instead of `assert ...include?`" - end - return unless @strict problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/ -- cgit v1.2.3