A huge problem we have in team development is code recycling.
Sometimes it may be good, recycling some factory-like code we previously created to be reusable, but most of the times it’s a mere copy-paste which leads to problems.
In Visual Studio 11 we have a great aid in avoiding this: Code Clone Analysis.
By selecting a code snippet, we can right-click it and selecting “Find Matching Clones in Solution”
It searches in the current document for clones, with various level of matching
This could be extended to the whole solution, by selecting “Analyse Solution for Code Clones” under the Analyze menu.
No comments:
Post a Comment