Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "automatically" remove unused units from uses clause?

Does anyone know about a utility, that can automatically detect and remove unrequired units from the uses clause?

Preferably it ..

  • can be run against a unit and/or a project
  • is free and works with Delphi 2010

Thanks in advance.

like image 608
rhazell Avatar asked Feb 04 '10 14:02

rhazell


1 Answers

Try using the "Uses Unit Cleaner" Wizard from CnPack you can download from here

alt text

Another option is use ICARUS.

ICARUS is a small subset of Pascal Analyzer. It parses Delphi or Borland Pascal source code and generates a list of unneeded unit references in your uses lists

like image 71
RRUZ Avatar answered Oct 12 '22 21:10

RRUZ