aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-09-05 18:10:02 +0100
committerGitHub2017-09-05 18:10:02 +0100
commitbf0ab938e7aebd13775bac82df7a7b24adefd61e (patch)
tree19b154c8d8909485141abfee5ec7b4402adcf384 /Library/Homebrew/dev-cmd
parent4cc8d4737b1c87cdc2d2c9e90d80b3b372bb924c (diff)
parent337d5c64708f3ad1d7074e17b1cd5be24e0ee488 (diff)
downloadbrew-bf0ab938e7aebd13775bac82df7a7b24adefd61e.tar.bz2
Merge pull request #3091 from GauthamGoli/audit_line_rubocop_part_3
audit: Port line_problems to rubocop and add tests part 3
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 884861c87..24e0eb4ff 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -878,10 +878,6 @@ class FormulaAuditor
problem "Use spaces instead of tabs for indentation" if line =~ /^[ ]*\t/
- if line.include?("ENV.x11")
- problem "Use \"depends_on :x11\" instead of \"ENV.x11\""
- end
-
if line.include?("ENV.java_cache")
problem "In-formula ENV.java_cache usage has been deprecated & should be removed."
end
@@ -899,14 +895,6 @@ class FormulaAuditor
problem "Use ENV instead of invoking '#{Regexp.last_match(1)}' to modify the environment"
end
- if formula.name != "wine" && line =~ /ENV\.universal_binary/
- problem "macOS has been 64-bit only since 10.6 so ENV.universal_binary is deprecated."
- end
-
- if line =~ /build\.universal\?/
- problem "macOS has been 64-bit only so build.universal? is deprecated."
- end
-
if line =~ /version == ['"]HEAD['"]/
problem "Use 'build.head?' instead of inspecting 'version'"
end
@@ -947,12 +935,6 @@ class FormulaAuditor
problem "Use build instead of ARGV to check options"
end
- problem "Use new-style option definitions" if line.include?("def options")
-
- if line.end_with?("def test")
- problem "Use new-style test definitions (test do)"
- end
-
if line.include?("MACOS_VERSION")
problem "Use MacOS.version instead of MACOS_VERSION"
end
@@ -966,11 +948,6 @@ class FormulaAuditor
problem "\"#{$&}\" is deprecated, use a comparison to MacOS.version instead"
end
- if line =~ /skip_clean\s+:all/
- problem "`skip_clean :all` is deprecated; brew no longer strips symbols\n" \
- "\tPass explicit paths to prevent Homebrew from removing empty folders."
- end
-
if line =~ /depends_on [A-Z][\w:]+\.new$/
problem "`depends_on` can take requirement classes instead of instances"
end
@@ -1009,30 +986,6 @@ class FormulaAuditor
problem "Use `assert_match` instead of `assert ...include?`"
end
- if line.include?('system "npm", "install"') && !line.include?("Language::Node") &&
- formula.name !~ /^kibana(\@\d+(\.\d+)?)?$/
- problem "Use Language::Node for npm install args"
- end
-
- if line.include?("fails_with :llvm")
- problem "'fails_with :llvm' is now a no-op so should be removed"
- end
-
- if line =~ /system\s+['"](otool|install_name_tool|lipo)/ && formula.name != "cctools"
- problem "Use ruby-macho instead of calling #{Regexp.last_match(1)}"
- end
-
- if formula.tap.to_s == "homebrew/core"
- ["OS.mac?", "OS.linux?"].each do |check|
- next unless line.include?(check)
- problem "Don't use #{check}; Homebrew/core only supports macOS"
- end
- end
-
- if line =~ /((revision|version_scheme)\s+0)/
- problem "'#{Regexp.last_match(1)}' should be removed"
- end
-
return unless @strict
problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/