[dead-code] chore: remove 10 dead functions from analyzer batch run#19880
Merged
[dead-code] chore: remove 10 dead functions from analyzer batch run#19880
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dead Code Removal
This PR removes 10 unreachable Go functions identified by the
deadcodestatic analyzer, plus 2 test files and multiple test functions that exclusively tested those deleted functions.Functions Removed
EngineRegistry.GetAllEnginespkg/workflow/agentic_engine.goCheckoutManager.GetCurrentRepositorypkg/workflow/checkout_manager.goCompiler.convertGoPatternToJavaScriptpkg/workflow/compiler_yaml_ai_execution.goCompiler.generateCheckoutGitHubFolderpkg/workflow/compiler_yaml_helpers.goExpressionExtractor.GetMappingspkg/workflow/expression_extraction.goCompiler.extractYAMLValuepkg/workflow/frontmatter_extraction_yaml.goCompiler.buildCreateProjectStepConfigpkg/workflow/compiler_safe_outputs_specialized.goJobManager.GetTopologicalOrderpkg/workflow/jobs.goMapToolConfig.GetAnypkg/workflow/mcp_config_types.gogetPlaywrightMCPPackageVersionpkg/workflow/mcp_playwright_config.goTests Removed
agentic_engine_interfaces_test.go(entire test file exclusively testingGetAllEngines)job_dependencies_test.go(entire test file exclusively testingGetTopologicalOrder)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 ./...— passesgo vet ./...— passesgo vet -tags=integration ./...— passesmake fmt— no changes neededgo test ./pkg/...— all tests pass (41s)Dead Function Count
Automated by Dead Code Removal Agent — Run ID: 22775616375