Sha256: 30a3c6919ed57d0c846715939a64c337444fbbe1e51d23329f6824738bc0e405

Contents?: true

Size: 461 Bytes

Versions: 6836

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,836 entries across 6,830 versions & 26 rubygems

Version Path
ory-client-0.0.1.alpha55 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha54 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha53 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha52 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha51 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha50 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha49 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha48 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha47 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha46 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha45 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha44 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha43 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha42 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha41 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha40 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha39 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha38 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha37 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb
ory-client-0.0.1.alpha36 vendor/bundle/ruby/2.5.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/empty_parameter.rb