One of the activities that I love to do in legacy projects is to make a refactoring in the code. We have to be careful because finally, we are updating code that is working fine in production. In the ideal scenario, we have Unit tests and Automation tests to avoid issues during refactoring.
We have many tools like CodeMaid, Resharper, and even Visual Studio have good tools to do this job or activity but in this article, I will talk about NDepend.
NDepend has a lot of tools to analyze a piece of code, a project, or a whole solution. It will show a report including warnings and issues found, there are many rules that NDepend has in order to validate our code.
Here an example:
We can analyze the issues reported and update our code properly, finally, we can run the analysis once again and see the results. Even this is the general propose of NDepend I want to keep the focus on the Power tools because for me are the most useful functionalities that we can find in NDepend.
Go to Tools -> Start Power Tools and it will show a new terminal with some options that we can perform on our projects.
All tools are great and useful for refactoring, But I will want to mention my favorites.
This tool helps to find duplicated code where we can make refactoring creating functions or removing some lines.
You can try NDepend for 14 days: https://www.ndepend.com/download