Unused import tool

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Aug 16 05:31:46 UTC 2023


On 16/08/2023 5:26 PM, Basile B. wrote:
> Again another reason to integrate the tool to the compiler. There would 
> be no need to write a driver, just a new option, let's say 
> "--check-unused-import", and "basta".

It would be part of dscanner that is built on dmd-fe.

Dscanner in recent versions is getting the ability to 'fix' code like 
dfix did.

So not only could dscanner check for unused imports, but it could remove 
them. Or even ideally add imports.


More information about the Digitalmars-d mailing list