There is a large (several hundred thousand lines) the project on Delphi, which is about 10 years.
I guess worked on it for more than a dozen developers. Therefore, it is possible to see various manifestations of human stupidity, negligence, krivorukost and other unpleasant things.
I would like a little project this comb, and as this process to automate (because manually this can take up to one week). Namely:
— remove commented out code blocks
— remove code that does not link to an executable file
— remove unused uses
— remove pas/dfm files that do not belong to the project
— all previous steps have been fully controlled
Well, desirable, different buns, the format type code for the template, identify potentially dangerous or just suspicious locations, etc. But the code cleanup (the above points) is the priority.