Skip to content

common: remove orphaned ErrorTypeConfig / ErrorTypeInsufficientPermissions enum values (no producers) #449

@kotakanbe

Description

@kotakanbe

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:

  1. Remove ErrorTypeConfig and ErrorTypeInsufficientPermissions, their getTypeString() cases, and the now-dead errors_test.go references; or
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions