Skip to content

Commit

Permalink
Allow the "Package Requires" line to be longer than 80 characters.
Browse files Browse the repository at this point in the history
Don't fail the tests if the "Package Requires" is longer than 80
characters.
  • Loading branch information
okamsn committed Dec 30, 2023
1 parent b701032 commit 0e17905
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/check-line-length.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e17905

Please sign in to comment.