aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint11
1 files changed, 8 insertions, 3 deletions
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;