diff options
| author | Mike McQuaid | 2017-12-30 18:58:41 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2017-12-30 20:56:55 +0000 |
| commit | 4fff56ca4f04c710db4000c65ec4e1502b50b62b (patch) | |
| tree | 03876772babf7a4aef98705b63f11d17caa9b792 | |
| parent | d54e670a6491ae3e6681448cfcf9332635149aa8 (diff) | |
| download | brew-4fff56ca4f04c710db4000c65ec4e1502b50b62b.tar.bz2 | |
lines_cop: check for more deprecated requirements.
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index c96efd0b1..fdeb165ed 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -6,12 +6,14 @@ module RuboCop # This cop checks for various miscellaneous Homebrew coding styles class Lines < FormulaCop def audit_formula(_node, _class_node, _parent_class_node, _body_node) - [:automake, :autoconf, :libtool, :mysql, :postgresql, :rbenv].each do |dependency| + [:automake, :ant, :autoconf, :emacs, :expat, :libtool, :mysql, :perl, + :postgresql, :python, :python3, :rbenv, :ruby].each do |dependency| next unless depends_on?(dependency) problem ":#{dependency} is deprecated. Usage should be \"#{dependency}\"." end - { apr: "apr-util", gpg: "gnupg" }.each do |requirement, dependency| + { apr: "apr-util", fortran: "gcc", gpg: "gnupg", hg: "mercurial", + mpi: "open-mpi", python2: "python" }.each do |requirement, dependency| next unless depends_on?(requirement) problem ":#{requirement} is deprecated. Usage should be \"#{dependency}\"." end @@ -239,11 +241,6 @@ module RuboCop problem "Use 'build.head?' instead of inspecting 'version'" end - find_instance_method_call(body_node, "ENV", :fortran) do - next if depends_on?(:fortran) - problem "Use `depends_on :fortran` instead of `ENV.fortran`" - end - find_instance_method_call(body_node, "ARGV", :include?) do |method| param = parameters(method).first next unless match = regex_match_group(param, /^--(HEAD|devel)/) |
