Class CognitiveComplexityMetric

  • All Implemented Interfaces:
    ApexOperationMetric, net.sourceforge.pmd.lang.metrics.Metric<ASTMethod>

    public class CognitiveComplexityMetric
    extends AbstractApexOperationMetric
    Measures the cognitive complexity of a Class / Method in Apex. See https://www.sonarsource.com/docs/CognitiveComplexity.pdf for information about the metric
    Author:
    Gwilym Kuiper
    • Constructor Detail

      • CognitiveComplexityMetric

        public CognitiveComplexityMetric()
    • Method Detail

      • computeFor

        public double computeFor​(ASTMethod node,
                                 net.sourceforge.pmd.lang.metrics.MetricOptions options)