Skip to content

Conversation

@Grazfather
Copy link
Collaborator

@Grazfather Grazfather commented Feb 8, 2026

Summary

  • Adds a GitHub Actions workflow that detects unused imports in changed Zig files
  • Uses zigimports to analyze imports
  • Posts a PR comment with findings (non-blocking, does not fail the build)
  • Automatically removes the comment when issues are resolved

Fixes #583.

Test plan

  • Open a test PR with an unused import to verify the workflow runs
  • Verify PR comment is posted with unused import details
  • Fix the unused import and verify the comment is removed

🤖 Generated with Claude Code

Grazfather and others added 4 commits February 8, 2026 12:18
Adds a non-blocking workflow that checks changed Zig files for unused
imports using zigimports. Posts a PR comment with findings but does not
fail the build, allowing maintainers to decide on cleanup.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The zigimports build outputs a platform-specific binary name like
zigimports-x86_64-linux instead of just zigimports. Add a symlink
to make the binary accessible at a consistent path.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove unused `builtin` and `serial` imports from main.zig
- Remove unused `diffz` import from RegzWindow.zig

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Contributor

@mattnite mattnite left a comment

Choose a reason for hiding this comment

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

Nice!

@mattnite mattnite merged commit 1e65c12 into main Feb 8, 2026
57 checks passed
@mattnite mattnite deleted the lint_unused_imports branch February 8, 2026 20:24
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.

linter: Detect unused imports

2 participants