Sha256: 30a3c6919ed57d0c846715939a64c337444fbbe1e51d23329f6824738bc0e405

Contents?: true

Size: 461 Bytes

Versions: 6792

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    # Common code for empty parameter cops.
    module EmptyParameter
      extend NodePattern::Macros

      private

      def_node_matcher :empty_arguments?, <<-PATTERN
        (block _ $(args) _)
      PATTERN

      def check(node)
        empty_arguments?(node) do |args|
          return if args.empty_and_without_delimiters?

          add_offense(args)
        end
      end
    end
  end
end

Version data entries

6,792 entries across 6,786 versions & 25 rubygems

Version Path
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.72.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.71.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.70.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.69.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.68.1 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.68.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.67.2 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.67.1 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.67.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.66.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.65.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.64.0 lib/rubocop/cop/mixin/empty_parameter.rb
rubocop-0.63.1 lib/rubocop/cop/mixin/empty_parameter.rb