Skip to main content

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

  • -p or --path: Directory to search (default: current directory)
  • -e or --extensions: File extensions to search (default: .py .R .sh .c .cpp .pl)
  • -o or --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

  1. Search current directory with default settings:

    python whattodo.py
    
  2. Search a specific directory:

    python whattodo.py /path/to/project
    
  3. Specify custom file extensions:

    python whattodo.py --extensions .py .js .html
    
  4. Output to a TSV file:

    python whattodo.py --output todos.tsv
    
  5. Output to a Markdown file:

    python whattodo.py --output todos.md
    
  6. Include git history in markdown format:

    python whattodo.py --git-history --git-history-format markdown
    
  7. 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

  1. Clone this repository:
git clone https://github.com/urineri/what2do.git
cd what2do
  1. Install in development mode:
pip install -e .
  1. Run the tool:
what2do --help

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

what2do-0.1.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

what2do-0.1.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

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

Hashes for what2do-0.1.3.tar.gz
Algorithm Hash digest
SHA256 04e15e3f37202df4b9ee4b869475afb1f25a2e005cc536a7608d4dd88b7be966
MD5 50be54972eb00c2f088740433a3550cc
BLAKE2b-256 b86a2a298ec7b0c4f839b11cf72f2e72789065ebe58ea2437f5ada3b1bcea951

See more details on using hashes here.

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

Hashes for what2do-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af96af9531b841417973963e2230ffecdecf59758ac0c90dbea8e6bdb122e7e7
MD5 8d77df8a05f2c8b23790063300e567e4
BLAKE2b-256 0a96c2fe1bbc074b9f735feb6032bb542ab959ffe272ac855f3f31a4d907ab17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page