Found during the /review-until-clean review of #440 and deferred (would require removing exported API + rewriting active tests, beyond that PR's mechanical-drift scope).
#440 removed the constructors/predicates NewConfigError, NewInsufficientPermissionsError, and IsInsufficientPermissionsError, but left the enum constants and their getTypeString() cases:
internal/common/errors.go: ErrorTypeConfig, ErrorTypeInsufficientPermissions (constants + getTypeString() switch cases)
Both values now have zero production producers — nothing constructs an error of these types anymore. ErrorTypeConfig is still referenced only by internal/common/errors_test.go (the type-string mapping test).
Per the project's "Delete what you don't use" standard, either:
- Remove
ErrorTypeConfig and ErrorTypeInsufficientPermissions, their getTypeString() cases, and the now-dead errors_test.go references; or
- Reintroduce a producer if one of these error types is intended to be used.
Notes
- Severity: LOW (dead but harmless enum members).
- Removing them is an exported-API change to
internal/common, so confirm no out-of-tree consumers before deleting (it is an internal/ package, so this is package-local).
Found during the
/review-until-cleanreview of #440 and deferred (would require removing exported API + rewriting active tests, beyond that PR's mechanical-drift scope).#440 removed the constructors/predicates
NewConfigError,NewInsufficientPermissionsError, andIsInsufficientPermissionsError, but left the enum constants and theirgetTypeString()cases:internal/common/errors.go:ErrorTypeConfig,ErrorTypeInsufficientPermissions(constants +getTypeString()switch cases)Both values now have zero production producers — nothing constructs an error of these types anymore.
ErrorTypeConfigis still referenced only byinternal/common/errors_test.go(the type-string mapping test).Per the project's "Delete what you don't use" standard, either:
ErrorTypeConfigandErrorTypeInsufficientPermissions, theirgetTypeString()cases, and the now-deaderrors_test.goreferences; orNotes
internal/common, so confirm no out-of-tree consumers before deleting (it is aninternal/package, so this is package-local).