Find TODO comments in code files
Project description
WhatToDo
command-line tool that scans directories for TODO comments in code files and generates a report.
Features
- Searches for TODO comments in specified file types
- Collects context, scope, and metadata for each TODO
- Outputs results to console, TSV, or Markdown format
- Tracks TODO history through git commits (when enabled)
- Shows when TODOs were added or removed
- Includes commit information (author, date, message)
- Supports both text and markdown output formats
** Note: this script is not intended to be a full-featured code analysis tool, it's just some regexs - the scope identification is very basic and could be improved.
Usage
python whattodo.py [path] [--extensions EXT [EXT ...]] [--output OUTPUT] [--git-history] [--git-history-format {text,markdown}]
Arguments
-por--path: Directory to search (default: current directory)-eor--extensions: File extensions to search (default: .py .R .sh .c .cpp .pl)-oor--output: Output file path (optional, .tsv or .md)--git-history: Include git history for TODOs (tracks when TODOs were added/removed)--git-history-format: Format for git history output ('text' or 'markdown', default: text)--include-hidden: Include hidden files and directories--ignore-paths: Additional paths to ignore
Examples
-
Search current directory with default settings:
python whattodo.py -
Search a specific directory:
python whattodo.py /path/to/project -
Specify custom file extensions:
python whattodo.py --extensions .py .js .html -
Output to a TSV file:
python whattodo.py --output todos.tsv -
Output to a Markdown file:
python whattodo.py --output todos.md -
Include git history in markdown format:
python whattodo.py --git-history --git-history-format markdown -
Combine options:
python whattodo.py /path/to/project --extensions .py .js --output todos.md --git-history
Requirements
- Python
- Git (optional, required for git history functionality)
Installation
There are two ways to install what2do:
1. Using pip (recommended)
pip install what2do
After installation, you can run the tool directly:
what2do --help
2. From source
- Clone this repository:
git clone https://github.com/urineri/what2do.git
cd what2do
- Install in development mode:
pip install -e .
- Run the tool:
what2do --help
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file what2do-0.1.3.tar.gz.
File metadata
- Download URL: what2do-0.1.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04e15e3f37202df4b9ee4b869475afb1f25a2e005cc536a7608d4dd88b7be966
|
|
| MD5 |
50be54972eb00c2f088740433a3550cc
|
|
| BLAKE2b-256 |
b86a2a298ec7b0c4f839b11cf72f2e72789065ebe58ea2437f5ada3b1bcea951
|
File details
Details for the file what2do-0.1.3-py3-none-any.whl.
File metadata
- Download URL: what2do-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af96af9531b841417973963e2230ffecdecf59758ac0c90dbea8e6bdb122e7e7
|
|
| MD5 |
8d77df8a05f2c8b23790063300e567e4
|
|
| BLAKE2b-256 |
0a96c2fe1bbc074b9f735feb6032bb542ab959ffe272ac855f3f31a4d907ab17
|