Skip to content

Commit c9d7c89

Browse files
committed
scripts/buildtests.sh - reduce whitelists for glib doc warnings
the warnings that happened when building glib docs have been fixed.
1 parent 80045d9 commit c9d7c89

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scripts/buildtests.sh

+6-7
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ SET_BDIR() {
108108
CHECK_WARNINGS() {
109109
set +e
110110
declare -i numIssues
111-
if (test -z "$3"); then
112-
numIssues=$(grep "$2" <"$1" | sort | uniq | wc -l | awk '{print $1}')
113-
else
111+
if (test -n "$3"); then
114112
numIssues=$(grep "$2" <"$1" | grep -v "$3" | sort | uniq | wc -l | awk '{print $1}')
113+
else
114+
numIssues=$(grep "$2" <"$1" | sort | uniq | wc -l | awk '{print $1}')
115115
fi
116116
if (test $numIssues -gt 0); then
117117
echo "EXITING. $numIssues warnings encountered"
@@ -130,7 +130,7 @@ CHECK_WARNINGS() {
130130
# print warnings found in the compile-stage output
131131
# $1 = file with the compile-stage output
132132
COMPILE_WARNINGS() {
133-
whitelist='\(i-cal-object\.c\|libical-glib-scan\.c\|no[[:space:]]link[[:space:]]for:\|Value[[:space:]]descriptions\|unused[[:space:]]declarations\|G_ADD_PRIVATE\|g_type_class_add_private.*is[[:space:]]deprecated\|g-ir-scanner:\|/gobject/gtype\.h\|clang.*argument[[:space:]]unused[[:space:]]during[[:space:]]compilation\|U_PLATFORM_HAS_WINUWP_API\|const[[:space:]]DBT\)'
133+
whitelist='g-ir-scanner:'
134134
CHECK_WARNINGS "$1" "warning:" "$whitelist"
135135
}
136136

@@ -145,16 +145,15 @@ CPPCHECK_WARNINGS() {
145145
# print warnings find in the clang-tidy output
146146
# $1 = file with the clang-tidy output
147147
TIDY_WARNINGS() {
148-
#whitelist='\(Value[[:space:]]descriptions\|unused[[:space:]]declarations\|g-ir-scanner:\|clang.*argument[[:space:]]unused[[:space:]]during[[:space:]]compilation\|modernize-\|cppcoreguidelines-pro-type-const-cast\|cppcoreguidelines-pro-type-vararg\|cppcoreguidelines-pro-type-reinterpret-cast\|cppcoreguidelines-owning-memory\|fuchsia.*\|hicpp-use-auto\|hicpp-no-malloc\|hicpp-use-nullptr\|hicpp-exception-baseclass\|hicpp-vararg\|cppcoreguidelines-pro-type-vararg\|cppcoreguidelines-pro-bounds-pointer-arithmetic\|google-build-using-namespace\|llvm-include-order\|hicpp-use-equals-default\|cppcoreguidelines-no-malloc\|g_type_class_add_private.*is[[:space:]]deprecated\)'
149-
whitelist='\(no[[:space:]]link[[:space:]]for:\|Value[[:space:]]descriptions\|unused[[:space:]]declarations\|G_ADD_PRIVATE\|g_type_class_add_private.*is[[:space:]]deprecated\|g-ir-scanner:\|clang.*argument[[:space:]]unused[[:space:]]during[[:space:]]compilation\|libical-glib-scan\.c\)'
148+
whitelist='g-ir-scanner:'
150149
CHECK_WARNINGS "$1" "warning:" "$whitelist"
151150
}
152151

153152
#function SCAN_WARNINGS:
154153
# print warnings found in the scan-build output
155154
# $1 = file with the scan-build output
156155
SCAN_WARNINGS() {
157-
whitelist='\(no[[:space:]]link[[:space:]]for:\|g_type_class_add_private.*is[[:space:]]deprecated\|libical-glib-scan\.c\|/i-cal-object\.c\|/vcc\.c\|/vobject\.c\|/icalsslexer\.c\|Value[[:space:]]descriptions\|unused[[:space:]]declarations\|icalerror.*Dereference[[:space:]]of[[:space:]]null[[:space:]]pointer\|G_ADD_PRIVATE\|g-ir-scanner:\)'
156+
whitelist='/vcc\.c\|/vobject\.c\|libical-glib-scan\.c\|Value[[:space:]]descriptions[[:space:]]\|g-ir-scanner:'
158157
CHECK_WARNINGS "$1" "warning:" "$whitelist"
159158
}
160159

0 commit comments

Comments
 (0)