Repository navigation
[dead-code] chore: remove dead functions — 2 functions removed - #75187
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The change removes the exported VisitExpressionTree API, potentially breaking downstream Go consumers while leaving the source-verified public API documentation inconsistent.
1 open issue
What changed in this PR
This pull request removes two unused workflow helpers and their dedicated tests while retaining expression parsing and rendering coverage. However, removing the exported VisitExpressionTree function is a breaking public API change, and the package README still documents it.
Changes:
- Removes
VisitExpressionTreeand related visitor tests. - Removes
conditionalPattern.ReplaceAllStringFuncand its unused import. - Retains expression parsing, rendering, and conditional-pattern coverage.
- Requires API compatibility and documentation updates before approval.
This pull request requires changes.
| File | Description |
|---|---|
pkg/workflow/template_conditional_pattern.go |
Removes the unused conditional-pattern replacement helper and import. |
pkg/workflow/expressions_test.go |
Removes visitor-specific tests and updates integration coverage. |
pkg/workflow/expression_parser.go |
Removes the exported VisitExpressionTree function. |
pkg/workflow/expression_coverage_test.go |
Removes coverage tests for the deleted visitor. |
Review effort: Lite (auto)
| return nil | ||
| } | ||
|
|
||
| func BreakLongExpression(source string) []string { |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error.
|
|
🎉 This pull request is included in a new release. Release: |

Functions Removed
VisitExpressionTreepkg/workflow/expression_parser.goconditionalPattern.ReplaceAllStringFuncpkg/workflow/template_conditional_pattern.goTests Removed
TestVisitExpressionTree,TestVisitExpressionTreeWithError(expressions_test.go)TestVisitExpressionTreeWithDifferentNodeTypes(expression_coverage_test.go)TestParseExpressionIntegration(rendering check kept)Verification
go build ./...go vet ./...go vet -tags=integration ./...make fmt(fails in sandbox: prettier not installed;gofmtclean on changed files)Note: 4
pkg/workflowtests (git credentials, enclave expiry) fail in the sandbox, unrelated to these deletions.https://github.com/github/gh-aw/actions/runs/42043106798