Code quality check · Repository

Functions over maintainability thresholds

Measures every function in a repository: cyclomatic complexity (independent paths through it), lines of code without blanks and comments, and parameter count. Reports each file with a function whose complexity is over 15, length over 100 lines or parameters more than 6, listing the worst ten; low severity when one is over 25, 200 or 10.

Why it matters

Every branch is a path that needs a test and that a reader has to hold in mind, and a long function or parameter list usually does several jobs at once; this is where defects hide and changes break things.

How to fix it

Split the function: extract steps and branches into named helpers, return early, replace long if/else or switch chains with a table, and group related parameters into a struct or object.

What TrustIvan reads

Measured by lizard 1.26.1 when a repository or filesystem scan runs the quality scanner (off by default; needs backend/Dockerfile.sast). One finding per file, at most 200 per scan, worst first; not risk-scored and no SLA.

Terms: SAST (static application security testing), Shift left

All code quality checks · The whole catalogue · How this works in TrustIvan · Documentation

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.