Skip to content

Commit aaf3eba

Browse files
authored
Use welcoming language (#15)
Motivation: The Swift community wants to be open and welcoming. Modifications: - Removes language that can be seen as unwelcoming - Add CI step to detect offensive language Result: A more welcoming project.
1 parent 0be9c3c commit aaf3eba

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

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 -xcl "./scripts/sanity.sh"
27+
command: /bin/bash -xcl "./scripts/soundness.sh"
2828

2929
test:
3030
<<: *common

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

+16
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ function replace_acceptable_years() {
2222
sed -e 's/2020-2021/YEARS/' -e 's/2020/YEARS/' -e 's/2021/YEARS/'
2323
}
2424

25+
printf "=> Checking for unacceptable language... "
26+
# This greps for unacceptable terminology. The square bracket[s] are so that
27+
# "git grep" doesn't find the lines that greps :).
28+
unacceptable_terms=(
29+
-e blacklis[t]
30+
-e whitelis[t]
31+
-e slav[e]
32+
-e sanit[y]
33+
)
34+
if git grep --color=never -i "${unacceptable_terms[@]}" > /dev/null; then
35+
printf "\033[0;31mUnacceptable language found.\033[0m\n"
36+
git grep -i "${unacceptable_terms[@]}"
37+
exit 1
38+
fi
39+
printf "\033[0;32mokay.\033[0m\n"
40+
2541
printf "=> Checking format... "
2642
FIRST_OUT="$(git status --porcelain)"
2743
swiftformat . > /dev/null 2>&1

0 commit comments

Comments
 (0)