bcquality/custom/knowledge/style/cyclomatic-complexity-is-not-a-gate-in-sp-repos.md
Paulius Urbanas 5149da25ba Add StrongPoint custom knowledge layer
Eight organization rules in custom/knowledge, each overriding or
supplementing the Microsoft layer for StrongPoint repositories:

- style/spu-prefix-on-objects-and-extension-members
- style/cyclomatic-complexity-is-not-a-gate-in-sp-repos (LC0010 = Info)
- ui/keep-tooltips-on-sp-page-fields (AA0218 = Error, LC0064 off;
  overrides microsoft ui/bound-page-field-inherits-source-field-tooltip)
- data-modeling/sp-field-names-fit-30-chars-with-prefix (AL0468 = Error)
- events/change-ls-central-behaviour-through-its-events
- web-services/device-io-goes-through-sp-device-manager
- appsource/sp-id-ranges-are-not-checked-by-as0084 (AS0084 = None)
- upgrade/sp-released-ids-never-change

Sources: sp.ruleset.json across SP repositories, SPUFBUpgrade pattern in
SP-LSC-Fiscal-Printing, observed LS Central and Device Manager usage.
Verified: all eight are indexed by Build-KnowledgeIndex.ps1, and a review
of a probe app applied the ToolTip rule as major and suppressed the
Microsoft article by layer precedence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:50:52 +03:00

1.2 KiB

bc-version domain keywords technologies countries application-area
all
style
cyclomatic-complexity
lc0010
lintercop
maintainability
false-positive
al
w1
all

Cyclomatic complexity (LC0010) is advisory in StrongPoint repositories

Description

StrongPoint's sp.ruleset.json downgrades LinterCop LC0010 (cyclomatic complexity) to Info, and a few repositories disable it. Long procedures in POS, fiscal-printing and device flows mirror LS Central's own event and state handling; splitting them only to satisfy the metric is not required. Complexity is therefore never a merge gate in SP code.

Best Practice

Mention high complexity at most as info or minor, and only together with a concrete readability or correctness problem you can point to (a duplicated branch, an unreachable path, a missing else). Judge new code on correctness first.

Anti Pattern

Reporting a procedure as major or blocker because LC0010 fires or because it "has too many branches", or asking for a refactor of existing complex procedures that the change did not touch.

References

StrongPoint policy: sp.ruleset.json — LC0010 Info ("Cyclomatic complexity warning changed to info").