Removing validation, error handling, logging or stated rules to shrink code
Errors and checks hidden: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as removed-safeguard.
What makes removing validation or error handling to shrink code a bad practice?
The standard that calls it a bad practice: lessloc's own "Never cut" list.
What does lessloc do about removing validation or error handling to shrink code?
lessloc catches it as removed-safeguard.
removed-safeguard(tier 1): Logging, error handling, validation, or a comment that states a security rule or contract was removed.
Related patterns
The other patterns in Errors and checks hidden:
- Swallowed errors: lessloc catches it as
swallowed-error. - Silenced checks: lessloc catches it as
suppression. - Checks, fallbacks and catches for cases that cannot happen:
defensivecatches a null check of a value just created, a type re-checked inside private code and?.on a fresh object.

