002_0009 - NoDefaultValue
Do not use default values on attributes
Remove the attribute default value and set it explicitly in logic where needed.
Metadata
authors:
- Rick Schreuder <rick.schreuder@valcon.com>
category: Maintainability
input: .*DomainModels\$DomainModel\.yaml
rulename: NoDefaultValue
rulenumber: 002_0009
scope: package
severity: LOW
Description
Avoid default values because it introduces hidden logic that is hard to detect via "find changes".
Remediation
Remove the attribute default value and set it explicitly in logic where needed.