Skip to content

Commit 1c03b43

Browse files
committed
1 parent 11ac62c commit 1c03b43

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

Sources/TencentSCFEvents/APIResponse.swift

-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,3 @@ public struct APIResponse: Encodable {
7878
}
7979
}
8080
}
81-

docker/docker-compose.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ services:
2222
- CAP_NET_RAW
2323
- CAP_NET_BIND_SERVICE
2424

25-
sanity:
25+
soundness:
2626
<<: *common
27-
command: /bin/bash -cl "./scripts/sanity.sh"
27+
command: /bin/bash -cl "./scripts/soundness.sh"
2828

2929
test:
3030
<<: *common

scripts/sanity.sh renamed to scripts/soundness.sh

+18-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,24 @@ here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3232

3333
function replace_acceptable_years() {
3434
# this needs to replace all acceptable forms with 'YEARS'
35-
sed -e 's/2020/YEARS/'
35+
sed -e 's/2020-2021/YEARS/'
36+
-e 's/2020/YEARS/' -e 's/2021/YEARS/'
3637
}
38+
printf "=> Checking for unacceptable language... "
39+
# This greps for unacceptable terminology. The square bracket[s] are so that
40+
# "git grep" doesn't find the lines that greps :).
41+
unacceptable_terms=(
42+
-e blacklis[t]
43+
-e whitelis[t]
44+
-e slav[e]
45+
-e sanit[y]
46+
)
47+
if git grep --color=never -i "${unacceptable_terms[@]}" > /dev/null; then
48+
printf "\033[0;31mUnacceptable language found.\033[0m\n"
49+
git grep -i "${unacceptable_terms[@]}"
50+
exit 1
51+
fi
52+
printf "\033[0;32mokay.\033[0m\n"
3753

3854
printf "=> Checking format... "
3955
FIRST_OUT="$(git status --porcelain)"
@@ -48,7 +64,7 @@ else
4864
fi
4965

5066
printf "=> Checking license headers for SwiftTencentSCFRuntime\n"
51-
tmp=$(mktemp /tmp/.swift-aws-lambda-sanity_XXXXXX)
67+
tmp=$(mktemp /tmp/.swift-tencent-scf-soundness_XXXXXX)
5268

5369
for language in swift-or-c bash dtrace; do
5470
printf " * $language... "

0 commit comments

Comments
 (0)