@@ -7927,9 +7927,6 @@ LKQL rule options files:
79277927The rules in this section can be used to enforce compliance with
79287928specific code metrics, by checking that the metrics computed for a program
79297929lie within user-specifiable bounds.
7930- Depending on the metric, there may be a lower bound, an upper bound, or both.
7931- A construct is flagged if the value of the metric exceeds the upper bound
7932- or is less than the lower bound.
79337930
79347931The name of any metrics rule consists of the prefix ``Metrics_ ``
79357932followed by the name of the corresponding metric:
@@ -7939,25 +7936,6 @@ followed by the name of the corresponding metric:
79397936The meaning and the computed values of the metrics are
79407937the same as in *gnatmetric *.
79417938
7942- For the ``+R `` option, each metrics rule has a numeric parameter
7943- specifying the bound (integer or real, depending on a metric).
7944-
7945- *Example: * the rule
7946-
7947- ::
7948-
7949- +RMetrics_Cyclomatic_Complexity : 7
7950-
7951-
7952- means that all bodies with cyclomatic complexity exceeding 7 will be flagged.
7953-
7954- To turn OFF the check for cyclomatic complexity metric,
7955- use the following option:
7956-
7957- ::
7958-
7959- -RMetrics_Cyclomatic_Complexity
7960-
79617939
79627940
79637941.. _Metrics_Cyclomatic_Complexity :
@@ -7970,8 +7948,12 @@ use the following option:
79707948The ``Metrics_Cyclomatic_Complexity `` rule takes a positive integer as
79717949upper bound. A program unit that is an executable body exceeding this limit will be flagged.
79727950
7973- This rule has the following optional parameter for the ``+R `` option and for
7974- LKQL rule options files:
7951+ This rule has the following parameters for the ``+R `` option and for LKQL rule
7952+ options files:
7953+
7954+ *N: int *
7955+ Maximum cyclomatic complexity a body can have without being flagged, all
7956+ bodies with a higher index will be flagged.
79757957
79767958*Exempt_Case_Statements: bool *
79777959 Whether to count the complexity introduced by ``case `` statement or ``case ``
@@ -8018,12 +8000,19 @@ of tests needed to satisfy paths coverage testing completeness criterion.
80188000
80198001.. index :: Metrics_Essential_Complexity
80208002
8021- The ``Metrics_Essential_Complexity `` rule takes a positive integer as
8022- upper bound. A program unit that is an executable body exceeding this limit will be flagged.
8003+ The ``Metrics_Essential_Complexity `` rule takes a positive integer as upper bound.
8004+ A program unit that is an executable body exceeding this limit will be flagged.
80238005
80248006The Ada essential complexity metric is a McCabe cyclomatic complexity metric counted
80258007for the code that is reduced by excluding all the pure structural Ada control statements.
80268008
8009+ This rule has the following (mandatory) parameter for the ``+R `` option and
8010+ for LKQL rule options files:
8011+
8012+ *N: int *
8013+ Maximum essential complexity a body can have without being flagged, all
8014+ bodies with a higher index will be flagged.
8015+
80278016.. rubric :: Example
80288017
80298018.. code-block :: ada
@@ -8057,17 +8046,23 @@ for the code that is reduced by excluding all the pure structural Ada control st
80578046
80588047.. index :: Metrics_LSLOC
80598048
8060- The ``Metrics_LSLOC `` rule takes a positive integer as
8061- upper bound. A program unit declaration or a program unit body exceeding
8062- this limit will be flagged.
8049+ The ``Metrics_LSLOC `` rule takes a positive integer as upper bound. A program
8050+ unit declaration or a program unit body exceeding this limit will be flagged.
80638051
8064- The metric counts the total number of declarations and the total number of statements.
8052+ The metric counts the total number of declarations and the total number of
8053+ statements.
80658054
8066- This rule has the following optional parameter for the ``+R `` option and for
8067- LKQL rule options files:
8055+ This rule has the following parameters for the ``+R `` option and for LKQL rule
8056+ options files:
8057+
8058+ *N: int *
8059+ Maximum number of logical source lines a program declaration / body can have
8060+ without being flagged, all bodies with a higher number of LSLOC will be
8061+ flagged.
80688062
80698063*Subprograms: bool *
8070- Whether to check the rule for subprogram bodies only.
8064+ Optional parameter specifying whether to check the rule for subprogram
8065+ bodies only.
80718066
80728067.. rubric :: Example
80738068
0 commit comments