Conversation
There was a problem hiding this comment.
Pull request overview
Removes a set of unused validation and map helper functions from pkg/workflow/ and deletes their now-obsolete tests as part of the ongoing dead code cleanup series.
Changes:
- Removed 6 dead exported validation helpers from
validation_helpers.go. - Removed 5 dead internal map helpers from
map_helpers.go. - Deleted 11 tests that exclusively covered the removed helpers from
validation_helpers_test.go.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/workflow/validation_helpers.go | Drops unused validation helpers and prunes related imports / header list. |
| pkg/workflow/map_helpers.go | Drops unused map-field extraction and emptiness helpers, simplifying the helper surface area. |
| pkg/workflow/validation_helpers_test.go | Removes tests that only exercised the deleted helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // - ValidateInList() - Validates that a value is in an allowed list | ||
| // - ValidatePositiveInt() - Validates that a value is a positive integer | ||
| // - ValidateNonNegativeInt() - Validates that a value is a non-negative integer | ||
| // - validateMountStringFormat() - Parses and validates a "source:dest:mode" mount string |
There was a problem hiding this comment.
The "Available Helper Functions" list was updated to remove the deleted exported validators, but it now omits other helpers that still exist in this file (e.g., formatList() and validateTargetRepoSlug()). Please update this section (or remove it) so the header documentation reflects the current contents of validation_helpers.go.
| // - validateMountStringFormat() - Parses and validates a "source:dest:mode" mount string | |
| // - validateMountStringFormat() - Parses and validates a "source:dest:mode" mount string | |
| // - formatList() - Formats a slice of strings into a human-readable comma-separated list | |
| // - validateTargetRepoSlug() - Validates that a target-repo slug is not a wildcard |
Removes 11 dead functions and their exclusive tests.
validation_helpers.go (6 functions):
map_helpers.go (5 functions):
Also removes the 11 corresponding test functions from validation_helpers_test.go.
All kept tests pass. Part of the ongoing dead code removal series.