Sha256: b7ecd7f9a4dbfcfe45fe4d227b39ff5dfa804b25450e76292d237656ae6d7d2a

Contents?: true

Size: 692 Bytes

Versions: 33

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Metrics
      # This cop checks that the ABC size of methods is not higher than the
      # configured maximum. The ABC size is based on assignments, branches
      # (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
      # and https://en.wikipedia.org/wiki/ABC_Software_Metric.
      class AbcSize < Cop
        include MethodComplexity

        MSG = 'Assignment Branch Condition size for %<method>s is too high. ' \
              '[%<complexity>.4g/%<max>.4g]'

        private

        def complexity(node)
          Utils::AbcSizeCalculator.calculate(node)
        end
      end
    end
  end
end

Version data entries

33 entries across 18 versions & 2 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb
rubocop-0.75.1 lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb
rubocop-0.75.0 lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/metrics/abc_size.rb