Detecting deadcode in your project

twitter logo github logo ・1 min read

Our frontend stack is using react (webpack) and after one year, our codebase becomes quite huge. My company is a startup, you know as startup we might change our flow quite often, it leads to a lot of code are not used anymore and we want to clean them as much as possible. After spending few weeks to research, I found several approaches to attack that problem, therefore, I wrote this blog

What do you think about those approaches?
What do you use to detect deadcode in your project?

twitter logo DISCUSS (2)
markdown guide

Another option: tests code coverage. It won't tell you about the dead imports but if you look at the code coverage report and a file has a low coverage it's either an untested section or dead code :-)


agree, that could be one of approaches for deadcode πŸ‘πŸ»

Classic DEV Post from Jul 30 '19

Save the planet, clean your mailbox

Minh Quy profile image