diff options
author | Dan Callahan <danc@element.io> | 2021-10-27 21:36:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 21:36:18 +0100 |
commit | a1ba7a850aaad51799ce77006ac5e8a425881765 (patch) | |
tree | aa501e65702a3e3fb179c3a0c37dc15543637f72 /scripts-dev/check-newsfragment | |
parent | Annotate `log_function` decorator (#10943) (diff) | |
parent | Merge remote-tracking branch 'origin/develop' into shellcheck (diff) | |
download | synapse-a1ba7a850aaad51799ce77006ac5e8a425881765.tar.xz |
Update scripts to pass Shellcheck lints (#11166)
Diffstat (limited to 'scripts-dev/check-newsfragment')
-rwxr-xr-x | scripts-dev/check-newsfragment | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts-dev/check-newsfragment b/scripts-dev/check-newsfragment index 393a548d58..af4de345df 100755 --- a/scripts-dev/check-newsfragment +++ b/scripts-dev/check-newsfragment @@ -42,10 +42,10 @@ echo "--------------------------" echo matched=0 -for f in `git diff --name-only FETCH_HEAD... -- changelog.d`; do +for f in $(git diff --name-only FETCH_HEAD... -- changelog.d); do # check that any modified newsfiles on this branch end with a full stop. - lastchar=`tr -d '\n' < $f | tail -c 1` - if [ $lastchar != '.' -a $lastchar != '!' ]; then + lastchar=$(tr -d '\n' < "$f" | tail -c 1) + if [ "$lastchar" != '.' ] && [ "$lastchar" != '!' ]; then echo -e "\e[31mERROR: newsfragment $f does not end with a '.' or '!'\e[39m" >&2 echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2 exit 1 |