@@ -108,10 +108,10 @@ SET_BDIR() {
108
108
CHECK_WARNINGS () {
109
109
set +e
110
110
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
114
112
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}' )
115
115
fi
116
116
if (test $numIssues -gt 0); then
117
117
echo " EXITING. $numIssues warnings encountered"
@@ -130,7 +130,7 @@ CHECK_WARNINGS() {
130
130
# print warnings found in the compile-stage output
131
131
# $1 = file with the compile-stage output
132
132
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:'
134
134
CHECK_WARNINGS " $1 " " warning:" " $whitelist "
135
135
}
136
136
@@ -145,16 +145,15 @@ CPPCHECK_WARNINGS() {
145
145
# print warnings find in the clang-tidy output
146
146
# $1 = file with the clang-tidy output
147
147
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:'
150
149
CHECK_WARNINGS " $1 " " warning:" " $whitelist "
151
150
}
152
151
153
152
# function SCAN_WARNINGS:
154
153
# print warnings found in the scan-build output
155
154
# $1 = file with the scan-build output
156
155
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:'
158
157
CHECK_WARNINGS " $1 " " warning:" " $whitelist "
159
158
}
160
159
0 commit comments