Skip to content

Commit deea56f

Browse files
committed
fix comment
1 parent 1cc45fe commit deea56f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

hack/boilerplate/update-boilerplate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ for i in ${find_go_files}; do
3232
if [[ $(sed -n 2p "$i") =~ "Copyright" ]]; then
3333
echo "Remove the current boilerplate and add the new boilerplate to $i"
3434
tail -n +17 "$i" >"$i.tmp"
35-
# If the 1st line starts with "//go:build" and the 2nd line starts with "Copyright", remove the current boilerplate and copy the marker for Go.
35+
# If the 1st line starts with "//go:build" and the 4th line starts with "Copyright", remove the current boilerplate and copy the marker.
3636
elif [[ $(sed -n 1p "$i") =~ "//go:build" ]] && [[ $(sed -n 4p "$i") =~ "Copyright" ]]; then
3737
echo "Remove the current boilerplate, copy the marker for Go, and add the new boilerplate to $i"
3838
sed -e "2,17d" "$i" > "$i.tmp"
@@ -42,7 +42,7 @@ for i in ${find_go_files}; do
4242
cat "$i" >"$i.tmp"
4343
fi
4444

45-
# If the 1st line starts with "//go:build", copy the marker for Go and add the new boilerplate to the file.
45+
# If the 1st line starts with "//go:build", copy the marker and add the new boilerplate to the file.
4646
if [[ $(sed -n 1p "$i.tmp") =~ "//go:build" ]]; then
4747
(head -2 "$i.tmp" && cat ./hack/boilerplate/boilerplate.go.txt && tail -n +3 "$i.tmp") >"$i" && rm "$i.tmp"
4848
# Otherwise, add the new boilerplate to the file.

hack/verify-shellcheck.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ set -o pipefail
1919

2020
cd "$(dirname "$0")/.."
2121

22+
if ! which shellcheck >/dev/null; then
23+
echo 'Can not find shellcheck, install with: make shellcheck'
24+
exit 1
25+
fi
26+
2227
shell_scripts=()
2328
while IFS='' read -r script;
2429
do git check-ignore -q "$script" || shell_scripts+=("$script");
2530
done < <(find . -name "*.sh" \
26-
! -path ./_\* \
27-
! -path ./.git\*
31+
! -path "./_*" \
32+
! -path "./.git/*"
2833
)
2934

3035
shellcheck "${shell_scripts[@]}"

0 commit comments

Comments
 (0)