count todo comments in specified directory
npm install -d todo-counter
The following will search for todo comments in foo/bar
directory and a subdirectories in files matching the .js
extension.
npx todo-counter 'foo/bar' '.js'
Examples of TODO's that will be counted:
// TODO: This thing needs fixing
//todo: this is be counted
// todo this will be counted
The following will search for skipped tests in foo/bar
directory and a subdirectories in files matching the .js
extension.
npx skipped-tests-counter 'foo/bar' '.js'
Examples of Skipped Tests that will be counted:
// SKIP: This thing needs fixing
//skip: this is be counted
// skip this will be counted
The following table structures are expected in your README
file with Date
cells including a <date>
tag and the Todo Count
/Skipped Tests Count
cells including a <todoCounter>
/<skippedTestsCounter>
tag. If one is not found, the counter will append one at the end of the README
file.
Date | Todo Count |
---|---|
02/02/02 | 2 |
03/03/03 | 3 |
04/04/04 | 4 |
05/05/05 | 5 |
06/06/06 | 6 |
07/07/07 | 7 |
08/08/08 | 8 |
09/09/09 | 9 |
10/10/10 | 10 |
08/23/23 | 11 |
Date | Skipped Tests Count |
---|---|
01/01/01 | 1 |
02/02/02 | 2 |
03/03/03 | 3 |
04/04/04 | 4 |
05/05/05 | 5 |
06/06/06 | 6 |
07/07/07 | 7 |
08/08/08 | 8 |
09/09/09 | 9 |
10/10/10 | 10 |
Run this utility with the operating system variable DEBUG=todo-counter
, for example
$ todo-counter npx count ...