[Issue 24778] Warning for unused imports

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 24 06:50:58 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24778

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #5 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to Lance Bachmeier from comment #4)
> (In reply to ryuukk_ from comment #3)
> > It should be builtin into the compiler
> > 
> > People should learn to submit PRs to DMD
> > 
> > In odin it is as simple as passing:
> > 
> > -vet-unused-imports
> >         Checks for unused import declarations.
> > 
> > 
> > 
> > Nobody wants to download external programs for such a basic, yet important,
> > feature
> 
> It's Razvan's script, so the problem is not lack of understanding of how to
> submit PRs. His post notes cases that will be hard to handle.

I was trying to implement it using dmd as a library to see if it's possible,
and if not to understand what changes are required to make it possible.
Implementing this inside the compiler would actually be easier, provided that
Walter does not oppose it.

--


More information about the Digitalmars-d-bugs mailing list