Re: Identifying Dead Code
Re: Identifying Dead Code
- Subject: Re: Identifying Dead Code
- From: Gordon Apple <email@hidden>
- Date: Wed, 20 Jun 2012 17:20:21 -0500
- Thread-topic: Identifying Dead Code
Title: Re: Identifying Dead Code
Well, if it’s commented out, it’s obviously not getting called. Yes, I mean live code, methods, etc, that nobody calls. Sometimes I might leave something in, just in case I want it later, but I’m mostly talking about code that has been replaced or rendered unneeded. Many times, I comment something out just to see who, if anybody, complains. That takes a lot of time if there are a lot of code to be checked. It would be a lot easier if xcode could identify unreachable code, and let me decide whether or not to zap it.
When I was doing systems engineering for gov-types, many of their contracts required removal of such code. Now, I just want to clean up my messes.
On 6/20/12 2:41 PM, "Marshall Clow" <email@hidden> wrote:
On Jun 20, 2012, at 12:13 PM, Gordon Apple wrote:
Is there any simple way to flag all the dead code in a file? After umpteen revisions and rewrites, cleaning up all the useless remaining code can be tedious.
What do you mean, exactly?
Code in a routine that is no longer reachable?
if ( i > 10 ) { do stuff; }
else if ( i < 15 ) { do other stuff; }
else { stuff that is never executed; }
Routines that are never called?
Code that is commented out?
-- Marshall
Marshall Clow Idio Software <mailto:email@hidden>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden