Sha256: d0413853fd00aba2a4fa14ec2a806e5c54f39b5913017452cb9481d0b609794d
Contents?: true
Size: 699 Bytes
Versions: 6763
Compression:
Stored size: 699 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]'.freeze private def complexity(node) Utils::AbcSizeCalculator.calculate(node) end end end end end
Version data entries
6,763 entries across 6,759 versions & 23 rubygems