Class cohesion DevCenter

MSAL

A DevCenter that grades the maintainability, cohesion, and test gaps of each repository, based on the class quality metrics and test gaps computed by Moderne Prethink.

Average Class Maintainability

The maintainability index (0-100) averaged across all classes in each repository.
F to A

F (0+) → D (20+) → C (40+) → B (60+) → A (80+)

Average Class Cohesion

LCOM4 (Lack of Cohesion of Methods, version 4) averaged across all classes in each repository; lower is more cohesive.
LOW to HIGH

LOW (10+) → MEDIUM (3+) → HIGH (0+)

Test Gaps Risk

The risk scores of public, non-trivial methods without tests, summed per repository.
LOW to HIGH

LOW (0+) → MEDIUM (3+) → HIGH (10+)

The DevCenter also counts lines of code per repository and committers active in the last 90 days. See the DevCenter documentation to customize.

io.moderne.devcenter.ClassCohesionDevCenter
mod run . --recipe=io.moderne.devcenter.ClassCohesionDevCenter

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find organization statistics
  2. Find active committers on repositories
  3. Find class quality metrics
  4. Find test coverage gaps
  5. Average Class Maintainability
  6. Average Class Cohesion
  7. Test Gaps Risk