Skip to content

[dead-code] chore: remove dead functions — 1 function removed#27818

Merged
pelikhan merged 1 commit intomainfrom
dead-code/remove-extractFirewallConfig-20260422-f5e58a39957c1382
Apr 22, 2026
Merged

[dead-code] chore: remove dead functions — 1 function removed#27818
pelikhan merged 1 commit intomainfrom
dead-code/remove-extractFirewallConfig-20260422-f5e58a39957c1382

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Dead Code Removal

This PR removes unreachable Go functions identified by the deadcode static analyzer.

Functions Removed

Function File
Compiler.extractFirewallConfig pkg/workflow/frontmatter_extraction_security.go

Tests Removed

  • TestExtractFirewallConfig in pkg/workflow/frontmatter_extraction_security_test.go — exclusively tested the deleted function.

Verification

  • go build ./... — passes
  • go vet ./... — passes
  • go vet -tags=integration ./... — passes
  • make fmt — no changes needed

Dead Function Count

  • Before this batch: 7 functions (2 WASM-live, 3 WASM-referenced, 1 test-infrastructure-heavy, 1 deleted)
  • Removed in this PR: 1 function
  • Skipped: CompileToYAML, ParseWorkflowString (live in WASM binary); WithNoEmit, WithSkipValidation, WithWorkflowIdentifier (referenced in cmd/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

Generated by Dead Code Removal Agent · ● 1.5M ·

  • expires on Apr 25, 2026, 12:15 PM UTC

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>
@pelikhan pelikhan marked this pull request as ready for review April 22, 2026 13:25
Copilot AI review requested due to automatic review settings April 22, 2026 13:25
@pelikhan pelikhan merged commit 85ace27 into main Apr 22, 2026
18 of 19 checks passed
@github-actions
Copy link
Copy Markdown
Contributor Author

Great work, @github-actions[bot]! 🎉 This dead-code removal PR is clean, well-scoped, and follows the project's agentic workflow model perfectly.

  • ✅ Single focused change: removes Compiler.extractFirewallConfig and its exclusively-dedicated test suite
  • ✅ Verified with go build, go vet, and make fmt
  • ✅ Clear before/after dead function count documented

This PR looks ready for maintainer review and merge!

Generated by Contribution Check · ● 1.8M ·

@github-actions github-actions Bot added the lgtm label Apr 22, 2026
@pelikhan pelikhan deleted the dead-code/remove-extractFirewallConfig-20260422-f5e58a39957c1382 branch April 22, 2026 13:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes unreachable firewall frontmatter extraction logic and its dedicated unit test, based on deadcode analyzer findings.

Changes:

  • Deleted Compiler.extractFirewallConfig from pkg/workflow/frontmatter_extraction_security.go.
  • Removed TestExtractFirewallConfig from pkg/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

@github-actions github-actions Bot mentioned this pull request Apr 22, 2026
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.

2 participants