digitalmars.D.learn - Unused imports
- Michael (3/3) Jan 30 2020 Is there a way to detect unused imports?
- Francesco Mecca (13/16) Jan 30 2020 https://issues.dlang.org/show_bug.cgi?id=20442
Is there a way to detect unused imports? It happened to me that I used imports which I did not need in the end. So, I'd like to remove them easily.
Jan 30 2020
On Thursday, 30 January 2020 at 16:23:54 UTC, Michael wrote:Is there a way to detect unused imports? It happened to me that I used imports which I did not need in the end. So, I'd like to remove them easily.https://issues.dlang.org/show_bug.cgi?id=20442 TL;DR This has come up in the past and the typical answer was: "This should be implemented as a third party tool using dmd as a library". It is a problem that there are no currently available tools to do that (maybe visual-d greys out unused imports) but I do agree that it should be provided as a third party. Such a functionality could end up in: https://github.com/dlang-community/D-Scanner and it is also a good first time project for a beginner in the D ecosystem.
Jan 30 2020