dev todos
Find TODO/LATER comments in configured scan roots
- Command version
0.0.0- Command configuration
dev-tool:dev.todos@0.0.0
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--paths | list[string] | No | [] | Optional explicit paths to scan instead of configured scan rootsRepeatable |
--include | list[string] | No | [] | File glob patterns to scan (defaults to common source/document types)Repeatable |
--exclude | list[string] | No | [] | Repository-relative path patterns the scan does not read; repeatable. A repository that always excludes the same trees sets this under argDefaults in its cli.config.yml, at the todos command's scopeRepeatable |
--pattern | string | No | "TODO|LATER" | Regular expression matching the annotation token (placed in comment position) |
--check, --no-check | boolean | No | false | Exit non-zero when any matching comment is found |
--sort | string one of path, tag | No | "path" | Sort matches by path or by tag |
It also takes the global arguments.
Output
It answers with a todos.todoSummary.
Types
todos.todoSummary
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
matches | list[todos.todoEntry] | No | [] | Each annotation comment found, ordered by path and line, or by annotation first under --sort tag |
matchCount | integer | No | 0 | How many comments matches holds |
scannedFileCount | integer | No | 0 | How many files were read for annotations: the ones holding a comment, with excluded files left out |
pattern | string | No | "" | The regular expression an annotation was matched by, as --pattern gave it |
check | boolean | No | false | Whether the run was made with --check, under which any match fails it as TODOS_FOUND |
todos.todoEntry
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | Yes | The file the comment is in, relative to the repository root | |
line | integer | Yes | The line of the file the comment is on, counted from 1 | |
tag | string | Yes | The annotation that matched --pattern, such as TODO | |
message | string | No | "" | The comment's text after the annotation; empty where it says nothing more |
owner | string | No | "" | What is written in parentheses directly after the annotation, as in TODO(name); empty where nothing is |