From 0e1790515bea9781d5bca8d37706a13226b93755 Mon Sep 17 00:00:00 2001 From: okamsn Date: Sat, 30 Dec 2023 18:57:34 -0500 Subject: [PATCH] Allow the "Package Requires" line to be longer than 80 characters. Don't fail the tests if the "Package Requires" is longer than 80 characters. --- scripts/check-line-length.bash | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/check-line-length.bash b/scripts/check-line-length.bash index 675961c..0fc25ff 100755 --- a/scripts/check-line-length.bash +++ b/scripts/check-line-length.bash @@ -14,9 +14,16 @@ find=( readarray -t files < <("${find[@]}" | sed 's#./##' | sort) +# Don't print the line length if: +# - If it is the first line +# - It is the Requirements line +# - The line contains a URL code="$(cat <<"EOF" -(NR > 1 && length($0) >= 80 && $0 !~ /https?:\/\//) \ +((NR > 1) \ + && ($0 !~ /^;; Package-Requires:/) \ + && (length($0) >= 80) \ + && ($0 !~ /https?:\/\//)) \ { printf "%s:%d: %s\n", FILENAME, NR, $0 } EOF