diff options
| author | Gautham Goli | 2017-05-24 00:08:31 +0530 | 
|---|---|---|
| committer | Gautham Goli | 2017-05-30 15:28:05 +0530 | 
| commit | 51f2338dd57eed5a7f18e147ccd4f4b9da19fb52 (patch) | |
| tree | 2898652aad1c8b469298103197dcaa9b1abe1c6a /Library/Homebrew/dev-cmd/audit.rb | |
| parent | 5b97a8f2e163f09d2ba7d7ef6424b3394cc71d44 (diff) | |
| download | brew-51f2338dd57eed5a7f18e147ccd4f4b9da19fb52.tar.bz2 | |
audit: Port audit_text method to rubocop and add tests
Diffstat (limited to 'Library/Homebrew/dev-cmd/audit.rb')
| -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  | 
