Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Story of a Python & a Vulture

Rahul Jha
October 13, 2019

The Story of a Python & a Vulture

Maintaining a high level of code quality is important for any serious project. One aspect of this is ensuring that all code is actually used. There are many reasons for dead code ending up in a project.The most common is refactoring, but another is misspellings, which are only detected at runtime for dynamic languages. Finding and removing dead code allows to keep the code base clean and reduces bugs.

This talk is focused on how we can use Vulture to find dead code. It helps you find unused code in Python programs and it is useful for cleaning up and finding errors in large code bases. If you run Vulture on both your library and test suite you can find untested code. Due to Python's dynamic nature, static code analyzers like Vulture are likely to miss some dead code. Also, code that is only called implicitly may be reported as unused. Nonetheless, Vulture can be a very helpful tool for higher code quality.

Rahul Jha

October 13, 2019
Tweet

Other Decks in Programming

Transcript

  1. MORE DEAD CODE Variables defined, but not used. Code after

    return statements Unsatisfiable Boolean conditions.
  2. CREDITS Husain Haider Zaidi (@husainhz7) Pradyun Gedam (@pradyunsg) Prajjwal Nijhara

    (@pnijhara) Prateek Jain (@prateekj117) Satwik Kansal (@satwikkansal)