File tree 5 files changed +38
-6
lines changed
5 files changed +38
-6
lines changed Original file line number Diff line number Diff line change @@ -601,12 +601,12 @@ print(context.baggage.traceID ?? "new trace id")
601
601
602
602
## Contributing
603
603
604
- Please make sure to run the ` ./scripts/sanity .sh ` script when contributing, it checks formatting and similar things.
604
+ Please make sure to run the ` ./scripts/soundness .sh ` script when contributing, it checks formatting and similar things.
605
605
606
606
You can ensure it always is run and passes before you push by installing a pre-push hook with git:
607
607
608
608
``` sh
609
- echo ' ./scripts/sanity .sh' > .git/hooks/pre-push
609
+ echo ' ./scripts/soundness .sh' > .git/hooks/pre-push
610
610
```
611
611
612
612
### Formatting
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ services:
22
22
- CAP_NET_RAW
23
23
- CAP_NET_BIND_SERVICE
24
24
25
- sanity :
25
+ soundness :
26
26
<< : *common
27
- command : /bin/bash -xcl "./scripts/sanity .sh"
27
+ command : /bin/bash -xcl "./scripts/soundness .sh"
28
28
29
29
docs :
30
30
<< : *common
Original file line number Diff line number Diff line change 28
28
fi
29
29
30
30
bash $here /validate_license_headers.sh
31
+ bash $here /validate_language.sh
31
32
bash $here /validate_format.sh
32
33
bash $here /validate_naming.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # #===----------------------------------------------------------------------===##
3
+ # #
4
+ # # This source file is part of the Swift Distributed Tracing open source project
5
+ # #
6
+ # # Copyright (c) 2021 Apple Inc. and the Swift Distributed Tracing project authors
7
+ # # Licensed under Apache License v2.0
8
+ # #
9
+ # # See LICENSE.txt for license information
10
+ # #
11
+ # # SPDX-License-Identifier: Apache-2.0
12
+ # #
13
+ # #===----------------------------------------------------------------------===##
14
+
15
+ set -eu
16
+
17
+ printf " => Checking for unacceptable language... "
18
+ # This greps for unacceptable terminology. The square bracket[s] are so that
19
+ # "git grep" doesn't find the lines that greps :).
20
+ unacceptable_terms=(
21
+ -e blacklis[t]
22
+ -e whitelis[t]
23
+ -e slav[e]
24
+ -e sanit[y]
25
+ )
26
+ if git grep --color=never -i " ${unacceptable_terms[@]} " > /dev/null; then
27
+ printf " \033[0;31mUnacceptable language found.\033[0m\n"
28
+ git grep -i " ${unacceptable_terms[@]} "
29
+ exit 1
30
+ fi
31
+ printf " \033[0;32mokay.\033[0m\n"
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
31
31
32
32
function replace_acceptable_years() {
33
33
# this needs to replace all acceptable forms with 'YEARS'
34
- sed -e ' s/2019-2020/YEARS/' -e ' s/2020/YEARS/'
34
+ sed -e ' s/2019-2020/YEARS/' -e ' s/2019-2021/YEARS/ ' -e ' s/ 2020/YEARS/ ' -e ' s/2021 /YEARS/'
35
35
}
36
36
37
37
printf " => Checking license headers\n"
38
- tmp=$( mktemp /tmp/.swift-baggage-context-sanity_XXXXXX )
38
+ tmp=$( mktemp /tmp/.swift-baggage-context-soundness_XXXXXX )
39
39
40
40
for language in swift-or-c bash dtrace; do
41
41
printf " * $language ... "
You can’t perform that action at this time.
0 commit comments