From b23e4b94d6dc6deaf13562d31b75f7201936ea6f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 7 Feb 2022 15:52:39 -0500 Subject: 15.0 misc fixes --- sbolint | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sbolint') diff --git a/sbolint b/sbolint index abce9c3..1bf38a0 100755 --- a/sbolint +++ b/sbolint @@ -638,9 +638,11 @@ sub check_and_read { return @lines; } +# 20220205 bkw: don't complain about long lines if they're URLs, +# not much we can do about them. sub check_readme { my @lines = check_and_read("README", 0644); - if(grep { length > 72 } @lines) { + if(grep { !/^\s*(ftp|https?):\/\// && length > 72 } @lines) { log_warning("README has lines >72 characters"); } # TODO: check encoding (must be ASCII or UTF-8) @@ -1076,7 +1078,10 @@ sub check_script { if($tag !~ /\$\{TAG:-(?:_SBo|("|')_SBo(\1))\}/) { log_error("$file:$lineno: TAG=\${TAG:-_SBo} is required"); } - } elsif(/^[^#]*\$\S*CWD\S*\/doinst.sh/) { + } elsif(/^[^#]*[^>]>[^>]*doinst\.sh/) { + # 20220205 bkw: some scripts don't have a doinst.sh in the + # script dir, but they create one with >> (the jack rt audio stuff + # does this). $need_doinst = $lineno; } elsif(/^[^#]*slack-desc/) { $slackdesc = $lineno; @@ -1292,7 +1297,7 @@ sub im_check_img { $ext =~ s,.*\.,,; $ext = lc $ext; - chomp($mime = `file --brief --mime "$img"`); + chomp($mime = `file -L --brief --mime "$img"`); if($mime !~ /$ext2mime{$ext}/) { log_error("$img has wrong extension $ext (MIME type is $mime)"); return; -- cgit v1.2.3