chore: remove workspace-wide dead_code clippy suppression - #147
Merged
Conversation
Remove the -A dead_code flag from the CI clippy invocation so dead code is caught by the -D warnings gate, and clean up everything it was hiding: - Delete 19 unused private format_* helpers across the command modules (admin, age_gate, approval, artifact, group, lifecycle, migrate, permission, promotion, quality_gate, repo). These operated on serde_json::Value and were superseded by inline table rendering from typed SDK responses; their only callers were their own unit tests. - Delete the never-constructed AkError::TokenExpired and AkError::PermissionDenied variants. - Remove the unit/snapshot tests and insta .snap files that only exercised the deleted helpers. cargo clippy --workspace -- -D warnings (no dead_code allow), cargo fmt --check, cargo build (debug/release), and cargo test --workspace all pass. Closes #70
|
brandonrc
marked this pull request as ready for review
July 9, 2026 23:01
coloraven
pushed a commit
to coloraven/artifact-keeper-cli
that referenced
this pull request
Aug 18, 2026
…de (artifact-keeper#147) Remove the -A dead_code flag from the CI clippy invocation so dead code is caught by the -D warnings gate, and clean up everything it was hiding: - Delete 19 unused private format_* helpers across the command modules (admin, age_gate, approval, artifact, group, lifecycle, migrate, permission, promotion, quality_gate, repo). These operated on serde_json::Value and were superseded by inline table rendering from typed SDK responses; their only callers were their own unit tests. - Delete the never-constructed AkError::TokenExpired and AkError::PermissionDenied variants. - Remove the unit/snapshot tests and insta .snap files that only exercised the deleted helpers. cargo clippy --workspace -- -D warnings (no dead_code allow), cargo fmt --check, cargo build (debug/release), and cargo test --workspace all pass. Closes artifact-keeper#70
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.



Summary
CI ran clippy with
-D warnings -A dead_code, which blanket-suppressed all dead-code warnings workspace-wide. This PR removes the-A dead_codeflag from the clippy step in.github/workflows/ci.ymland cleans up every warning the new gate surfaces.Changes
cargo clippy --workspace -- -D warnings -A dead_codetocargo clippy --workspace -- -D warnings(everything else unchanged).format_*helpers across the command modules (admin,age_gate,approval,artifact,group,lifecycle,migrate,permission,promotion,quality_gate,repo). These operated onserde_json::Valueand were superseded by inline table rendering built from typed SDK response structs; their only remaining callers were their own unit tests.AkErrorvariants (TokenExpired,PermissionDenied) — nothing in the codebase produced them.format_*unit tests, thesnapshot_*_tabletests that snapshotted the dead helpers' output, their 11 orphaned.snapfiles, and the 2 Display tests for the removed error variants.Net: 2 insertions, 1,881 deletions across 24 files. No
#[allow(dead_code)]escapes were needed — every flagged item was a genuine leftover with no production callers, so all 21 were deleted rather than allow-listed.Note: the equivalent
*_jsonsnapshot tests (which go through the realoutput::renderpath) are untouched, so JSON output rendering remains covered.Verification
cargo clippy --workspace -- -D warnings(new gate, no dead_code allow): exit 0cargo buildandcargo build --release: cleancargo fmt --check: cleancargo test --workspace: all passing (2024 unit tests + integration suites)cfg-gated (platform-specific) code was touchedCloses #70