Conversation
Remove unreachable Compiler.extractFirewallConfig identified by the deadcode static analyzer. No production binary entry point calls this function; only test files referenced it. Also removes TestExtractFirewallConfig which exclusively tested the deleted function. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Great work,
This PR looks ready for maintainer review and merge!
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes unreachable firewall frontmatter extraction logic and its dedicated unit test, based on deadcode analyzer findings.
Changes:
- Deleted
Compiler.extractFirewallConfigfrompkg/workflow/frontmatter_extraction_security.go. - Removed
TestExtractFirewallConfigfrompkg/workflow/frontmatter_extraction_security_test.go.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/frontmatter_extraction_security.go | Removes the dead extractFirewallConfig helper. |
| pkg/workflow/frontmatter_extraction_security_test.go | Removes the unit test that exclusively covered the deleted helper. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
Closed
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 unreachable Go functions identified by the
deadcodestatic analyzer.Functions Removed
Compiler.extractFirewallConfigpkg/workflow/frontmatter_extraction_security.goTests Removed
TestExtractFirewallConfiginpkg/workflow/frontmatter_extraction_security_test.go— exclusively tested the deleted function.Verification
go build ./...— passesgo vet ./...— passesgo vet -tags=integration ./...— passesmake fmt— no changes neededDead Function Count
CompileToYAML,ParseWorkflowString(live in WASM binary);WithNoEmit,WithSkipValidation,WithWorkflowIdentifier(referenced incmd/gh-aw-wasm/main.go);WithVersion(used as setup in 30+ non-exclusive test callers — would require large test refactor)Automated by Dead Code Removal workflow — https://github.com/github/gh-aw/actions/runs/24777239915