Pull request 1998: upd-proj-skel
Squashed commit of the following:
commit 5cc2914b18fd71ff83e2872ef6755f2ff56d653c
Merge: bf14a513e 085b4fdce
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Sep 7 14:58:44 2023 +0300
Merge branch 'master' into upd-proj-skel
commit bf14a513eb46ebf2c2809246603b071e6c334e9f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Sep 7 14:47:10 2023 +0300
all: imp code
commit ec3f7a88b86b3f423193aa95c2e820bcd86fdef3
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Sep 7 14:28:39 2023 +0300
scripts: upd go lint
commit 6a9342f6058bc21252f97045f7015440f013cb09
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Sep 7 14:13:17 2023 +0300
all: upd proj skel
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# This comment is used to simplify checking local copies of the script. Bump
|
||||
# this number every time a remarkable change is made to this script.
|
||||
#
|
||||
# AdGuard-Project-Version: 4
|
||||
# AdGuard-Project-Version: 5
|
||||
|
||||
verbose="${VERBOSE:-0}"
|
||||
readonly verbose
|
||||
@@ -31,7 +31,7 @@ set -f -u
|
||||
|
||||
# trailing_newlines is a simple check that makes sure that all plain-text files
|
||||
# have a trailing newlines to make sure that all tools work correctly with them.
|
||||
trailing_newlines() {
|
||||
trailing_newlines() (
|
||||
nl="$( printf "\n" )"
|
||||
readonly nl
|
||||
|
||||
@@ -42,12 +42,13 @@ trailing_newlines() {
|
||||
':!*.zip'\
|
||||
| while read -r f
|
||||
do
|
||||
if [ "$( tail -c -1 "$f" )" != "$nl" ]
|
||||
final_byte="$( tail -c -1 "$f" )"
|
||||
if [ "$final_byte" != "$nl" ]
|
||||
then
|
||||
printf '%s: must have a trailing newline\n' "$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
)
|
||||
|
||||
# trailing_whitespace is a simple check that makes sure that there are no
|
||||
# trailing whitespace in plain-text files.
|
||||
|
||||
Reference in New Issue
Block a user