lines_cop: deprecate 'needs :openmp'.
This commit is contained in:
		
							parent
							
								
									4fff56ca4f
								
							
						
					
					
						commit
						f9b6407110
					
				@ -276,6 +276,10 @@ module RuboCop
 | 
			
		||||
            problem "'fails_with :llvm' is now a no-op so should be removed"
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          find_method_with_args(body_node, :needs, :openmp) do
 | 
			
		||||
            problem "'needs :openmp' should be replaced with 'depends_on \"gcc\"'"
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          find_method_with_args(body_node, :system, /^(otool|install_name_tool|lipo)/) do
 | 
			
		||||
            next if @formula_name == "cctools"
 | 
			
		||||
            problem "Use ruby-macho instead of calling #{@offensive_node.source}"
 | 
			
		||||
 | 
			
		||||
@ -731,6 +731,17 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
 | 
			
		||||
      RUBY
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "deprecated needs :openmp usage" do
 | 
			
		||||
      expect_offense(<<~RUBY)
 | 
			
		||||
        class Foo < Formula
 | 
			
		||||
          desc "foo"
 | 
			
		||||
          url 'http://example.com/foo-1.0.tgz'
 | 
			
		||||
          needs :openmp
 | 
			
		||||
          ^^^^^^^^^^^^^ 'needs :openmp' should be replaced with 'depends_on \"gcc\"'
 | 
			
		||||
        end
 | 
			
		||||
      RUBY
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "deprecated MACOS_VERSION const usage" do
 | 
			
		||||
      expect_offense(<<~RUBY)
 | 
			
		||||
        class Foo < Formula
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user