Skip to content

Architecture Issue 3: Add procedure complexity metrics #460

Description

@harumiWeb

Summary

Calculate maintainability metrics for VBA procedures and optionally report configurable thresholds.

Initial metrics

  • cyclomatic complexity
  • maximum nesting depth
  • statement count
  • source line count
  • branch count
  • loop count
  • GoTo count
  • number of exit points
  • parameter count
  • ByRef parameter count
  • local variable count
  • call fan-out

Requirements

  • Produce metrics independently from diagnostics.
  • Expose metrics through JSON.
  • Allow thresholds to be configured separately.
  • Keep subjective threshold diagnostics opt-in initially.
  • Exclude generated or configured paths where appropriate.
  • Ensure single-line and multiline syntax are counted consistently.

Acceptance criteria

  • Metrics are deterministic.
  • JSON output has a versioned schema.
  • Thresholds can be configured or disabled.
  • Tests cover nested branches, loops, labels, and properties.
  • Metrics can be consumed by future reporting features.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions