-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.mk
More file actions
35 lines (30 loc) · 781 Bytes
/
todo.mk
File metadata and controls
35 lines (30 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Todo makefile
# -------------
# List of code tags to search for.
# TODO: Externalize tags list
TAGS = TODO|FIXME|CHANGED|XXX|REVIEW|BUG|REFACTOR|IDEA|WARNING
.PHONY: todo
todo: # Show todos.
@find . \
-type f \
-not -path "./.git/*" \
-exec \
awk '/[ ]($(TODO_TAGS)):/ \
{ \
gsub("# ","", $$0); \
gsub("// ","", $$0); \
gsub(/\.\./,"", $$0); \
gsub(/^[ \t]+/, "", $$0); \
gsub(/:/, "", $$0); \
gsub(/\.\//,"", FILENAME); \
TYPE = $$1; $$1 = ""; \
MESSAGE = $$0; \
LINE = NR; \
printf \
"$(CYAN)%s|$(WHITE):%s|: $(CYAN)%s$(WHITE)($(BLUE)%s$(WHITE))\n"\
, TYPE, MESSAGE, FILENAME, LINE \
}' \
{} \; | column -s '|' -t
.PHONY: tags
tags: # Show current tags list.
@echo "$(TAGS)"