A high-performance Rust application that finds the oldest TODO comment in any Git repository, using the exact Git blame information to identify when a TODO was added and by whom.
- Fast Repository Scanning: Uses ripgrep for lightning-fast code searching
- Accurate Blame Information: Leverages Git blame to find the exact commit that introduced each TODO
- Web Interface: Easy-to-use web UI for submitting repositories
- Flashy Results: The author's name flashes dramatically as requested!
- Background Cleanup: Automatically removes old repository clones to save disk space
- Rust (latest stable)
- Git (command-line)
- ripgrep (
rgcommand-line tool)
The project is organized as a workspace with one crates:
- blame_finder: A library that handles repository cloning, TODO finding, and Git blame analysis
And a binary for running the axum server:
- oldest-todo-finder: The Axum web server that provides the user interface
First, make sure you have Git and ripgrep installed:
# Ubuntu/Debian
sudo apt install git ripgrep
# macOS
brew install git ripgrep
# Windows (with Chocolatey)
choco install git ripgrep# Clone the repository
git clone https://github.com/yourusername/oldest-todo-finder.git
cd oldest-todo-finder
# Build the project
cargo build --release# Run the server
cargo run --releaseBy default, the server will listen on http://localhost:3000.
# Find the oldest TODO in a repository
cargo run --example find_todos -- https://github.com/username/repoThe blame_finder crate provides a simple API:
// Find the oldest TODO in a repository
let result = blame_finder::find_oldest_todo("https://github.com/username/repo").await?;
// Clean up old repository clones (older than 7 days)
let cleaned_count = blame_finder::cleanup_old_repos(7).await?;- The repository is cloned to a local directory (or updated if it already exists)
- ripgrep searches for "TODO" comments across all code files
- For each TODO, git blame determines who added it and when
- The TODOs are sorted by date to find the oldest one
- The results are displayed with the author's name flashing dramatically
The application creates a .oldest-todo-finder directory in your home folder to store cloned repositories. These are automatically cleaned up after 7 days of inactivity.
This implementation is designed for speed:
- ripgrep is used for fast code searching (can be 10x faster than alternatives)
- Git operations use efficient commands
- Cloned repositories are cached to avoid repeated cloning
MIT