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