Skip to content

chore: remove workspace-wide dead_code clippy suppression - #147

Merged
brandonrc merged 1 commit into
mainfrom
feat/70-remove-dead-code-allow
Jul 9, 2026
Merged

chore: remove workspace-wide dead_code clippy suppression#147
brandonrc merged 1 commit into
mainfrom
feat/70-remove-dead-code-allow

Conversation

@brandonrc

Copy link
Copy Markdown
Contributor

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_code flag from the clippy step in .github/workflows/ci.yml and cleans up every warning the new gate surfaces.

Changes

  • CI: clippy step changed from cargo clippy --workspace -- -D warnings -A dead_code to cargo clippy --workspace -- -D warnings (everything else unchanged).
  • Deleted 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 built from typed SDK response structs; their only remaining callers were their own unit tests.
  • Deleted 2 never-constructed AkError variants (TokenExpired, PermissionDenied) — nothing in the codebase produced them.
  • Removed the tests and insta snapshots that only exercised deleted code: the dedicated format_* unit tests, the snapshot_*_table tests that snapshotted the dead helpers' output, their 11 orphaned .snap files, 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 *_json snapshot tests (which go through the real output::render path) are untouched, so JSON output rendering remains covered.

Verification

  • cargo clippy --workspace -- -D warnings (new gate, no dead_code allow): exit 0
  • cargo build and cargo build --release: clean
  • cargo fmt --check: clean
  • cargo test --workspace: all passing (2024 unit tests + integration suites)
  • No cfg-gated (platform-specific) code was touched

Closes #70

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
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@brandonrc
brandonrc marked this pull request as ready for review July 9, 2026 23:01
@brandonrc
brandonrc merged commit 58e8276 into main Jul 9, 2026
16 checks passed
@brandonrc
brandonrc deleted the feat/70-remove-dead-code-allow branch July 25, 2026 00:00
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead code lint globally suppressed with -A dead_code

1 participant