Skip to content

Use welcoming language #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ services:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE

sanity:
soundness:
<<: *common
command: /bin/bash -cl "./scripts/sanity.sh"
command: /bin/bash -cl "./scripts/soundness.sh"

test:
<<: *common
Expand Down
18 changes: 17 additions & 1 deletion scripts/sanity.sh → scripts/soundness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ function replace_acceptable_years() {
sed -e 's/2017-2018/YEARS/' -e 's/2017-2020/YEARS/' -e 's/2019/YEARS/' -e 's/2020/YEARS/'
}

printf "=> Checking for unacceptable language... "
# This greps for unacceptable terminology. The square bracket[s] are so that
# "git grep" doesn't find the lines that greps :).
unacceptable_terms=(
-e blacklis[t]
-e whitelis[t]
-e slav[e]
-e sanit[y]
)
if git grep --color=never -i "${unacceptable_terms[@]}" > /dev/null; then
printf "\033[0;31mUnacceptable language found.\033[0m\n"
git grep -i "${unacceptable_terms[@]}"
exit 1
fi
printf "\033[0;32mokay.\033[0m\n"

printf "=> Checking format... "
FIRST_OUT="$(git status --porcelain)"
swiftformat . > /dev/null 2>&1
Expand All @@ -35,7 +51,7 @@ else
fi

printf "=> Checking license headers\n"
tmp=$(mktemp /tmp/.swift-aws-lambda-sanity_XXXXXX)
tmp=$(mktemp /tmp/.swift-aws-lambda-soundness_XXXXXX)

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