Skip to content

Add deadcode analysis to CI; fix existing dead code#824

Merged
justaugustus merged 2 commits intomainfrom
copilot/add-deadcode-tool-integration
Apr 22, 2026
Merged

Add deadcode analysis to CI; fix existing dead code#824
justaugustus merged 2 commits intomainfrom
copilot/add-deadcode-tool-integration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

deadcode (unlike unused) traces reachability from main, catching functions that exist in production code but are only exercised by tests. This adds it to CI and removes the one dead function it found.

Changes

  • .github/workflows/pr.yaml: New deadcode job — installs golang.org/x/tools/cmd/deadcode and runs deadcode ./cmd/allstar/... on every PR.

  • pkg/policies/scorecard/sarif.go: Remove clearSARIFHashes — unreachable from main.

  • pkg/policies/scorecard/sarif_test.go: Move clearSARIFHashes here as a test-scoped helper, where it belongs.

Copilot AI changed the title [WIP] Add deadcode tool to development workflow and CI Add deadcode analysis to CI; fix existing dead code Apr 21, 2026
Copilot AI requested a review from justaugustus April 21, 2026 19:43
@jeffmendoza jeffmendoza marked this pull request as ready for review April 22, 2026 15:48
@jeffmendoza jeffmendoza requested a review from a team as a code owner April 22, 2026 15:48
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 22, 2026
@justaugustus justaugustus merged commit 6f36ce9 into main Apr 22, 2026
10 checks passed
@justaugustus justaugustus deleted the copilot/add-deadcode-tool-integration branch April 22, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

deadcode follow-up

3 participants