Zigimports: Unused imports cleaner for Zig

Zig currently entirely ignores unused globals, which means unused imports aren’t errors. They aren’t even warnings.

In fact, you can have an import importing a module/file that doesn’t even exist , and the Zig compiler will simply ignore it.

zigimports helps you avoid that by cleaning up unused imports and globals.

10 Likes

That’s really cool and I needed that. Have you considered contributing to Zls?

2 Likes

I plan on contributing to zls and zig core, yes. Baby steps though, I am barely a few weeks into trying out zig.

2 Likes