File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 3838 script : scripts/travis_lint.sh
3939 before_cache :
4040
41+ - &string-table-check
42+ stage : Linter + Doxygen + non-debug Ubuntu/gcc-5 test
43+ env : NAME="string-table"
44+ install :
45+ script : scripts/string_table_check.sh
46+ before_cache :
47+
4148 - stage : Linter + Doxygen + non-debug Ubuntu/gcc-5 test
4249 env : NAME="DOXYGEN-CHECK"
4350 addons :
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ whitelist=" \
4+ "
5+
6+ cleanup ()
7+ {
8+ rm -f " $ids_file "
9+ }
10+
11+ ids_file=$( mktemp)
12+
13+ trap cleanup EXIT
14+
15+ gcc -E -P -x c src/util/irep_ids.def \
16+ -D' IREP_ID_ONE(x)=ID_ ## x' -D' IREP_ID_TWO(x,y)=ID_ ## x' > $ids_file
17+
18+ for w in $whitelist
19+ do
20+ perl -p -i -e " s/^$w \n//" $ids_file
21+ done
22+
23+ for i in $( < $ids_file )
24+ do
25+ if ! git grep -w -q -c -F $i
26+ then
27+ echo " $i is never used"
28+ exit 1
29+ fi
30+ done
You can’t perform that action at this time.
0 commit comments