diff options
| author | Mike McQuaid | 2017-05-30 19:10:39 +0100 |
|---|---|---|
| committer | GitHub | 2017-05-30 19:10:39 +0100 |
| commit | 344c49229936736c902e08d965b4ed2262aa2c0c (patch) | |
| tree | 6283eb6e1e2930ec20a0bab2dc1990fbd955b223 /Library/Homebrew/dev-cmd | |
| parent | d1f802c372563e36fe656c4662cae9e5b4138cdd (diff) | |
| parent | cfbdc17cb7a86bca8efcea082f8cabb459b9b260 (diff) | |
| download | brew-344c49229936736c902e08d965b4ed2262aa2c0c.tar.bz2 | |
Merge pull request #2662 from GauthamGoli/audit_text_rubocop
audit: Port audit_text method to rubocop and add tests
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index d1665ea6f..4ceff0f3d 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -850,14 +850,6 @@ class FormulaAuditor end def audit_text - if text =~ /system\s+['"]scons/ - problem "use \"scons *args\" instead of \"system 'scons', *args\"" - end - - if text =~ /system\s+['"]xcodebuild/ - problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args") - end - bin_names = Set.new bin_names << formula.name bin_names += formula.aliases @@ -872,34 +864,6 @@ class FormulaAuditor end end end - - if text =~ /xcodebuild[ (]*["'*]*/ && !text.include?("SYMROOT=") - problem 'xcodebuild should be passed an explicit "SYMROOT"' - end - - if text.include? "Formula.factory(" - problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\"" - end - - if text.include?("def plist") && !text.include?("plist_options") - problem "Please set plist_options when using a formula-defined plist." - end - - if text =~ /depends_on\s+['"]openssl['"]/ && text =~ /depends_on\s+['"]libressl['"]/ - problem "Formulae should not depend on both OpenSSL and LibreSSL (even optionally)." - end - - if text =~ /virtualenv_(create|install_with_resources)/ && - text =~ /resource\s+['"]setuptools['"]\s+do/ - problem "Formulae using virtualenvs do not need a `setuptools` resource." - end - - if text =~ /system\s+['"]go['"],\s+['"]get['"]/ - problem "Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s." - end - - return unless text.include?('require "language/go"') && !text.include?("go_resource") - problem "require \"language/go\" is unnecessary unless using `go_resource`s" end def audit_lines |
