Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
DLR-AMR
GitHub Repository: DLR-AMR/t8code
Path: blob/main/scripts/create_todo_list.sh
900 views
1
#!/bin/bash
2
3
# This file is part of t8code.
4
# t8code is a C library to manage a collection (a forest) of multiple
5
# connected adaptive space-trees of general element classes in parallel.
6
#
7
# Copyright (C) 2023 the developers
8
#
9
# t8code is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
13
#
14
# t8code is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with t8code; if not, write to the Free Software Foundation, Inc.,
21
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23
# This shell script will parse all files given in the variable SEARCH_PATH
24
# for C-style TODO comments. That is comments starting with "TODO" and
25
# ending with "*/"
26
#
27
# The script then prints out all these comments together with file and line.
28
29
PROJECT_DIR=".."
30
31
for folder in src example test
32
do
33
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*.h"
34
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*.c"
35
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*.hxx"
36
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*.cxx"
37
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*/*.h"
38
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*/*.c"
39
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*/*.hxx"
40
SEARCH_PATH="$SEARCH_PATH $PROJECT_DIR/$folder/*/*.cxx"
41
done
42
grep TODO $SEARCH_PATH -n -A20 | awk '/TODO/,/*\//'
43
44