diff options
Diffstat (limited to 'todostat.awk')
-rw-r--r-- | todostat.awk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/todostat.awk b/todostat.awk new file mode 100644 index 0000000..be29d8f --- /dev/null +++ b/todostat.awk @@ -0,0 +1,14 @@ +/^\+-/ { if (state < 3) state++; else state = -1; next } +/^\|/ { if (state == 1) state++; else state = -1; next } +state != 3 { next } +{ total++ } +$3=="[X]" { impl++; if ($4 != "[X]") print $1, "not documented"; } +$4=="[X]" { doc++; } +END { + if (!total) + exit(0); + printf("Total : %4d\n", total); + printf("Implemented: %4d / %3d%%\n", impl, impl * 100 / total); + printf("Documented : %4d / %3d%%\n", doc, doc * 100 / total); +} + |