Skip to content

UNI008: Low maintainability

What and why

Method MI < 60.

Low Maintainability Index signals hard-to-change code.

Threshold: MI < 60.

How to fix: shorten the method, reduce complexity, or improve naming.

Default thresholds

Severity Condition
Warning MI < 60

Fix guidance

Simplify the method to raise Maintainability Index (threshold: MI < 60).

Tags

maintainability

Suppression

Place // unilyze-disable UNI008 -- reason in the leading trivia of the reported type or method declaration. Metric findings are matched by type or method name, so suppressing one overload also suppresses same-name overloads. For partial types, place the directive on the declaration indexed by unilyze. For project-wide suppression, use "rules": { "UNI008": "off" }; use a baseline to freeze existing findings while reporting new ones.