Skip to content

RazvanN7/Unused-Import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Unused import tool for D

This tool identifies unused top-level imports. It uses dmd as a library, therefore it performs full semantic analysis before checking whether an import used or not. As such, it is currently very limited:

  • it only identifies unused top-level imports.
  • it does not work for selective or renamed imports.
  • aliases are eagerly substituted so we cannot know if imported_module_a.var is actually a direct use of var or whether alias imported_module_b.alias_to_var was used.
  • enums are eagerly substituted with their correspoding integer value, so you cannot know whether 3 was actually imported_module.Enum_decl.Three or the literal 3.

To use the tool:

chmoad a+x unused_import.d
./unused_import.d

About

Unused import detection tool for D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages