File: todo

package info (click to toggle)
libpqxx 7.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,184 kB
  • sloc: cpp: 14,681; sh: 4,859; python: 801; makefile: 244
file content (30 lines) | stat: -rwxr-xr-x 586 bytes parent folder | download
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
#! /bin/bash
#
# List "TODO" and "XXX" items in the given files, or throughout the source
# code.

set -e -u -o pipefail

# TODO: Make location-independent?
find_source() {
    echo configure.ac
    find . -name '*.[ch]xx' | sed -e 's|^\./||' | sort
    echo tools/*
}


FILES=${*:-$(find_source)}


# Search for "$1:" in files $2.
# (This function adds the colon.  That way, the search statement itself won't
# show up in the search.)
search_for() {
    local key="$1:"
    shift
    find_source | xargs grep "$key"
}


search_for XXX "$FILES" || true
search_for TODO "$FILES" || true