Skip to content

[dead-code] chore: remove 10 dead functions from analyzer batch run#19880

Merged
pelikhan merged 2 commits intomainfrom
main-f979e07e9d0feb26
Mar 6, 2026
Merged

[dead-code] chore: remove 10 dead functions from analyzer batch run#19880
pelikhan merged 2 commits intomainfrom
main-f979e07e9d0feb26

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 6, 2026

Dead Code Removal

This PR removes 10 unreachable Go functions identified by the deadcode static analyzer, plus 2 test files and multiple test functions that exclusively tested those deleted functions.

Functions Removed

Function File
EngineRegistry.GetAllEngines pkg/workflow/agentic_engine.go
CheckoutManager.GetCurrentRepository pkg/workflow/checkout_manager.go
Compiler.convertGoPatternToJavaScript pkg/workflow/compiler_yaml_ai_execution.go
Compiler.generateCheckoutGitHubFolder pkg/workflow/compiler_yaml_helpers.go
ExpressionExtractor.GetMappings pkg/workflow/expression_extraction.go
Compiler.extractYAMLValue pkg/workflow/frontmatter_extraction_yaml.go
Compiler.buildCreateProjectStepConfig pkg/workflow/compiler_safe_outputs_specialized.go
JobManager.GetTopologicalOrder pkg/workflow/jobs.go
MapToolConfig.GetAny pkg/workflow/mcp_config_types.go
getPlaywrightMCPPackageVersion pkg/workflow/mcp_playwright_config.go

Tests Removed

  • agentic_engine_interfaces_test.go (entire test file exclusively testing GetAllEngines)
  • job_dependencies_test.go (entire test file exclusively testing GetTopologicalOrder)
  • TestGetCurrentRepository (checkout_manager_test.go)
  • TestGenerateCheckoutGitHubFolder (compiler_yaml_helpers_test.go)
  • TestConvertGoPatternToJavaScript (compiler_yaml_test.go)
  • TestCreateProjectGitHubTokenEnvVar (create_project_token_test.go)
  • TestExtractYAMLValue (frontmatter_extraction_yaml_test.go)
  • TestExpressionExtractor_ReplaceExpressionsWithEnvVars (expression_extraction_test.go)

Verification

  • go build ./... — passes
  • go vet ./... — passes
  • go vet -tags=integration ./... — passes
  • make fmt — no changes needed
  • go test ./pkg/... — all tests pass (41s)

Dead Function Count

  • Before this batch: ~56 functions (from deadcode analyzer run)
  • Removed in this PR: 10 functions
  • Remaining: ~46 functions

Automated by Dead Code Removal Agent — Run ID: 22775616375

Generated by Dead Code Removal Agent ·

  • expires on Mar 9, 2026, 6:19 PM UTC

Removed the following unreachable functions:
- EngineRegistry.GetAllEngines (pkg/workflow/agentic_engine.go)
- CheckoutManager.GetCurrentRepository (pkg/workflow/checkout_manager.go)
- Compiler.convertGoPatternToJavaScript (pkg/workflow/compiler_yaml_ai_execution.go)
- Compiler.generateCheckoutGitHubFolder (pkg/workflow/compiler_yaml_helpers.go)
- ExpressionExtractor.GetMappings (pkg/workflow/expression_extraction.go)
- Compiler.extractYAMLValue (pkg/workflow/frontmatter_extraction_yaml.go)
- Compiler.buildCreateProjectStepConfig (pkg/workflow/compiler_safe_outputs_specialized.go)
- JobManager.GetTopologicalOrder (pkg/workflow/jobs.go)
- MapToolConfig.GetAny (pkg/workflow/mcp_config_types.go)
- getPlaywrightMCPPackageVersion (pkg/workflow/mcp_playwright_config.go)

Removed test files and functions that exclusively tested the deleted functions:
- agentic_engine_interfaces_test.go (tested GetAllEngines)
- job_dependencies_test.go (tested GetTopologicalOrder)
- TestGetCurrentRepository (checkout_manager_test.go)
- TestGenerateCheckoutGitHubFolder (compiler_yaml_helpers_test.go)
- TestConvertGoPatternToJavaScript (compiler_yaml_test.go)
- TestCreateProjectGitHubTokenEnvVar (create_project_token_test.go)
- TestExtractYAMLValue (frontmatter_extraction_yaml_test.go)
- TestExpressionExtractor_ReplaceExpressionsWithEnvVars (expression_extraction_test.go)

Verification:
- ✅ Build succeeds (go build ./...)
- ✅ Vet passes (go vet ./...)
- ✅ Format check passes (make fmt)
- ✅ All tests pass (go test ./pkg/...)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan merged commit 7e32c82 into main Mar 6, 2026
49 checks passed
@pelikhan pelikhan deleted the main-f979e07e9d0feb26 branch March 6, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant