Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Dead code detedtion/elimination

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Dusan Posted - Jan 16 2011 : 2:51:24 PM
As far as I look into VAX functionality, it has all it needs to make a solid 'dead code detection and elimination'. Is there any way to make it with current version? Any automation?

Thakns...
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 19 2011 : 11:47:16 AM
As Nobodo says, this is something we are considering adding to VA at some point in time:

case=2335

For now if you have a function or variable that you suspect is unused a combination of turning on:

VA Options -> Advanced -> Refactoring -> Automatically highlight references to symbol under cursor

for local variables, and Find References for function calls should help you work out if something is currently being used or not.
Nobodo Posted - Jan 17 2011 : 11:12:17 AM
It is in some competing tools like Resharper and MZ-Tools, so if you don't have a tool that does dead code analysis you might want to put a recommendation in the suggestions forum here.

Using Resharper as an example... you can select colors to display dead code in, and the analysis is done in real-time as you use the IDE. I have Resharper display dead code grayed-out and with a sickly yellow background to make it obvious. It displays not only entire methods and properties that are dead code but also extremely useful items like local vars, method parameters that are not used, etc. For example, if you add a new local var to a method, it instantly displays as dead code until you add a reference to it.

Actually, there was a recommendation and discussion of this back in 2006 and again a couple of times over the next couple of years to add dead code analysis to VAX. Do a "Match exact phrase" search for:
case=2335
Luke1410 Posted - Jan 17 2011 : 05:21:10 AM
Normally such stuff is the responsibility of a static code analysis tool --- u might wanna give one of them a try (just to name one: PC Lint from Gimpel).

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000