DEV Community

SybilGambleyyu
SybilGambleyyu

Posted on • Originally published at sybilgambleyyu.github.io

fileage: find code nobody has touched

Dead code rarely announces itself. Before you delete a package, you want the files nobody has committed to in a year.

fileage walks git ls-files, records each path’s last-touch commit in a single git log pass, and ranks by age.

Install

pip install git+https://github.com/SybilGambleyyu/fileage.git
Enter fullscreen mode Exit fullscreen mode

Usage

fileage --days 365 -n 40
fileage --ext .py --prefix src/legacy
fileage -f md
Enter fullscreen mode Exit fullscreen mode

With the toolkit

fileage --days 365 --ext .py -n 20
whoimports src/legacy/foo.py
gitchurn --prefix src/legacy -n 10
Enter fullscreen mode Exit fullscreen mode

Zero dependencies. MIT.
Source: github.com/SybilGambleyyu/fileage

Top comments (0)