ek9_query_metric_limits

Returns EK9's ENFORCED quality-metric limits (coupling, cohesion, complexity, DI, size) - limitCount and limits[] with ruleCode, metricKey, limitKind, comparator, limit and usableMax - from the single source the checkers fire on.

Category: Enquiry · Compare: EK9 IDE — quality-gate settings panel (the enforced quality-metric limits)

When to use it

'What limit does EK9 enforce on X, and at what value' is one call with {} - every quality gate with its rule code, comparator and usableMax. Coupling, cohesion, complexity, nesting, statements, DI and size, from the single source the checkers fire on; no workspace needed.

When not to use it

Details

ENFORCED, not advisory: the compiler emits the entry's ruleCode the instant a value crosses its limit - no warning tier, no bypass. limitKind is one of scalar, per-genus, compound, ratio: scalar carries comparator/limit/usableMax ('>' means limit is the last legal value, '>=' means limit-1 is); per-genus adds a byGenus table keyed by the EK9 construct word (class, trait, record, enumeration, function, abstract-function, component, service), fallback and exempt kinds (LCOM4 exempts record/trait/function); compound fires only when disconnectedGroups>maxGroups AND ratio>maxRatio once minConstructs is reached; ratio fires when a fraction exceeds its threshold (each entry's condition says which). constructCoupling's limit is integer but its MEASURED value may be fractional (by-trait delegation discounts 0.5 each).

Arguments

None of its own.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

Limits shape

Request

{ }

Response

{
  "limitCount" : 34,
  "limits" : [ {
    "comparator" : ">",
    "limit" : 10,
    "limitKind" : "scalar",
    "metricKey" : "moduleCoupling",
    "ruleCode" : "E11016",
    "usableMax" : 10
  }, {
    "byGenus" : {
      "abstract-function" : 8,
      "class" : 12,
      "component" : 15,
      "enumeration" : 12,
      "function" : 8,
      "record" : 8,
      "service" : 15,
      "trait" : 8
    },
    "comparator" : ">",
    "exempt" : [ ],
    "fallback" : 12,
    "limitKind" : "per-genus",
...

Cut short here: 250 more lines. The whole recorded call.