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 Jun 14 '19

How do you organize your projects?

Where do you keep your side projects and portfolio?

Minh Quy profile image

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️