Skip to content

Commit c6437b7

Browse files
authored
Use welcoming language (#178)
1 parent 16cfcc6 commit c6437b7

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ We require that your commit messages match our template. The easiest way to do t
6565
SwiftLog uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not.
6666
For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made.
6767

68-
### Run `./scripts/sanity.sh`
68+
### Run `./scripts/soundness.sh`
6969

70-
The scripts directory contains a [sanity.sh script](https://github.com/apple/swift-log/blob/main/scripts/sanity.sh)
70+
The scripts directory contains a [soundness.sh script](https://github.com/apple/swift-log/blob/main/scripts/soundness.sh)
7171
that enforces additional checks, like license headers and formatting style.
7272

73-
Please make sure to `./scripts/sanity.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
73+
Please make sure to `./scripts/soundness.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
7474
on minor changes such as a missing `self.` or similar formatting issues.
7575

7676
> The script also executes the above mentioned `generate_linux_tests.rb`.
@@ -81,8 +81,8 @@ For frequent contributors, we recommend adding the script as a [git pre-push hoo
8181
cat << EOF > .git/hooks/pre-push
8282
#!/bin/bash
8383
84-
if [[ -f "scripts/sanity.sh" ]]; then
85-
scripts/sanity.sh
84+
if [[ -f "scripts/soundness.sh" ]]; then
85+
scripts/soundness.sh
8686
fi
8787
EOF
8888
```

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 scripts/soundness.sh

+17-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ else
4747
printf "\033[0;32mokay.\033[0m\n"
4848
fi
4949

50+
printf "=> Checking for unacceptable language... "
51+
# This greps for unacceptable terminology. The square bracket[s] are so that
52+
# "git grep" doesn't find the lines that greps :).
53+
unacceptable_terms=(
54+
-e blacklis[t]
55+
-e whitelis[t]
56+
-e slav[e]
57+
-e sanit[y]
58+
)
59+
if git grep --color=never -i "${unacceptable_terms[@]}" > /dev/null; then
60+
printf "\033[0;31mUnacceptable language found.\033[0m\n"
61+
git grep -i "${unacceptable_terms[@]}"
62+
exit 1
63+
fi
64+
printf "\033[0;32mokay.\033[0m\n"
65+
5066
printf "=> Checking format... "
5167
FIRST_OUT="$(git status --porcelain)"
5268
swiftformat . > /dev/null 2>&1
@@ -60,7 +76,7 @@ else
6076
fi
6177

6278
printf "=> Checking license headers\n"
63-
tmp=$(mktemp /tmp/.swift-log-sanity_XXXXXX)
79+
tmp=$(mktemp /tmp/.swift-log-soundness_XXXXXX)
6480

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

0 commit comments

Comments
 (0)