Skip to content

Remove unused code - #118

Open
christianhelle wants to merge 3 commits into
mainfrom
remove-dead-code
Open

christianhelle wants to merge 3 commits into
mainfrom
remove-dead-code

Conversation

@christianhelle

@christianhelle christianhelle commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove an unused generator test fixture and its dependencies.
  • Remove unreferenced converter aliases and stale module imports.

Validation

  • zig fmt --check .
  • zig build -Doptimize=Debug and zig build test (unit/regression suite)
  • zig build -Doptimize=ReleaseFast, ReleaseSafe, ReleaseSmall, and zig build build-all
  • zig build run-generate and zig run generated/main.zig
  • zig build run-generated with a temporary localhost LM Studio API stub; the sample normally expects a service on port 1234.

Summary by CodeRabbit

  • Chores
    • Removed unused internal imports and outdated generator test setup. No user-facing behavior changes.

Copilot AI lite review requested due to automatic review settings September 22, 2026 22:04
@christianhelle christianhelle added the enhancement New feature or request label Sep 22, 2026
@christianhelle christianhelle self-assigned this Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c98aec77-d016-4657-bc18-7cd33eb8c0cc

📥 Commits

Reviewing files that changed from the base of the PR and between 2c439f4 and 7f37d99.

📒 Files selected for processing (9)
  • src/cli.zig
  • src/generator.zig
  • src/generator/tests.zig
  • src/generators/converters/openapi31_converter.zig
  • src/generators/converters/openapi32_converter.zig
  • src/generators/converters/openapi_converter.zig
  • src/generators/converters/swagger_converter.zig
  • src/generators/unified/model_generator/fields.zig
  • src/generators/unified/model_generator/manual.zig
💤 Files with no reviewable changes (9)
  • src/generators/converters/swagger_converter.zig
  • src/generators/converters/openapi32_converter.zig
  • src/generator.zig
  • src/generators/unified/model_generator/manual.zig
  • src/generator/tests.zig
  • src/cli.zig
  • src/generators/converters/openapi31_converter.zig
  • src/generators/unified/model_generator/fields.zig
  • src/generators/converters/openapi_converter.zig

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This pull request removes unused imports across CLI, generator, converter, and unified generator modules. It also deletes an unused test helper and its related imports from the generator test file.

Changes

Code and test cleanup

Layer / File(s) Summary
CLI and generator import cleanup
src/cli.zig, src/generator.zig
Removes unused imports from the CLI module and the generator module. No other code in these files changed.
Converter import cleanup
src/generators/converters/swagger_converter.zig, src/generators/converters/openapi_converter.zig, src/generators/converters/openapi31_converter.zig, src/generators/converters/openapi32_converter.zig
Removes unused Contact*, License*, and one SecuritySchemeOrReference31 import alias from converter modules. The remaining converter logic stays in place.
Unified generator and test helper cleanup
src/generators/unified/model_generator/fields.zig, src/generators/unified/model_generator/manual.zig, src/generator/tests.zig
Removes unused ident_utils.zig imports from unified model generator files. Deletes the buildPetstoreUnified test helper and the models and OpenApiConverter imports that supported it.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 7f37d

No actionable issue is established by the supplied review context. Normal checks remain appropriate before merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes the main change: removing unused imports, aliases, and a test fixture. It is broad but clear and relevant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified, and the listed validation completed successfully.

Review effort: Lite
Findings: None

What changed in this PR

Removes unused imports, converter aliases, and an unreferenced generator test fixture without changing runtime behavior.

Changes:

  • Cleans stale imports across generators, converters, CLI, and orchestration.
  • Removes unused OpenAPI/Swagger aliases.
  • Deletes the obsolete Petstore fixture and dependencies.
File Description
src/​generators/​unified/​model_generator/​manual.zig Removes unused identifier utility import.
src/​generators/​unified/​model_generator/​fields.zig Removes unused identifier utility import.
src/​generators/​converters/​swagger_converter.zig Removes unused contact and license aliases.
src/​generators/​converters/​openapi32_converter.zig Removes unused contact and license aliases.
src/​generators/​converters/​openapi31_converter.zig Removes unused aliases.
src/​generators/​converters/​openapi_converter.zig Removes unused contact and license aliases.
src/​generator/​tests.zig Removes unused fixture and dependencies.
src/​generator.zig Removes unused library import.
src/​cli.zig Removes unused imports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.06%. Comparing base (c85e185) to head (7f37d99).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files         136      136           
  Lines       16941    16941           
=======================================
  Hits        16444    16444           
  Misses        497      497           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants