Best Practices for Removing Unused Code

后端 未结 8 1222
花落未央
花落未央 2021-02-07 17:56

I\'d like to know what people\'s best practices are for removing unused code. Personally I\'m a fan of deleting (not just commenting) anything that\'s not currently being used.

8条回答
  •  醉酒成梦
    2021-02-07 18:29

    I am going to suggest replacing the deleted code with a comment specifying the Work Item against which the code was deleted. My rationale is this provides a "hook" onto which any code review comments can be attached. We're using TFS change sets to do code reviews VS Professional. If the code is 100% deleted there is no hook.

提交回复
热议问题