Skip to main content

Scan for TODO's

Project description

TODO-finder

Build Status codecov

It finds TODOs!

Requirements

Python 3.8

To install, run pip install todofinder.

Usage

Specify a glob pattern with -g and use -o to specify where to store the CSV report.

python -m todofinder -g <glob_pattern> ... <glob_pattern> -o FILE

The CSV file will have the following fields, and it will have a header with these field names:

  • file: absolute path to the file
  • line_number: the TODO's line number
  • text: The text after "TODO:" (colon optional)
  • token: The matched token (either TODO or FIXME)
  • full_line: The complete line (newlines stripped)
  • filetype: The file's file type (part after the first dot).

Plugins

You can use -p or --plugins to enable language-specific parsers that will prevent false positives and skip over lines without comments. Currently available plugins:

  • Python: -p py
  • C: -p c

You can have one or more active plugins (e.g. -p py c) or all at once (-p all)

Blame

You can use -b or --blame to run git blame on all files with TODOs and extract info. This will add the following fields to the CSV report:

  • author: The name of the person who last touched the line
  • date: The date at which the last commit touching the line was made
  • commit: The commit hash
  • message: The first line of the commit message

Note that using --blame will make the script run much, much slower, since it shells out to git for every file.

Project details


Download files

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

Files for todofinder, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size todofinder-1.2.0-py3-none-any.whl (6.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size todofinder-1.2.0.tar.gz (8.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page