Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jesperkha/todo

CLI tool for finding todo comments in codebases
https://github.com/jesperkha/todo

Last synced: 3 days ago
JSON representation

CLI tool for finding todo comments in codebases

Awesome Lists containing this project

README

        

# todo

## Use:

By default, it will run with configuration set in `config.json`
```console
$ todo

┌── Todo ──────────────────────────────────────────────────────────────┐
│ │
│ 1. main.go:20 remove debug code after testing │
│ 2. other.go:6 include variable image sizes in export │
│ 3. test/test.go:68 add test cases for resizing and bordering │
│ │
└──────────────────────────────────────────────────────────────────────┘
```

Flags:
- `-r`: use relative paths (overrides config)
- `-d`: specify directory
- `-p`: specify prefix (overrides config)
- `-t`: print todos as raw text without formatting

Options:
- `--help`: display help info
- `--version`: print version

Example:
```console
$ todo -r -pTODO -dsome_dir
```

## Commands

### `rm`

Remove a todo from a file (removes the line the todo is located at). The list index is the number on the left of the list item when printing (starts at 1).

`todo rm `

## Config

You can add a `config.json` file in the same directory as the todo binary. If no config file is found then default options will be used. These are the config options you can put in you config file:

```js
// These are also the default values
{
"prefix": "Todo:",
// Max search depth
"depth": 5,
"relativePaths": false,
// Ignored file extensions (exe, png etc)
"ignoreFiles": [],
// Ignored directories (.vscode, .git etc)
"ignoreDirs": []
}
```