diff options
| -rw-r--r-- | TODO | 6 | ||||
| -rwxr-xr-x | sbolint | 39 |
2 files changed, 44 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Missing argument in printf at /home/urchlay/bin/sbolint line 544, <$fh> line 2. + +TODO: sbolint should check for invalid characters in REQUIRES. someone + had an issue with a tab character, which looked fine when editing + or viewing the file... but the submission form choked on it. +TODO: sbopkglint: error on 0.0.0.dist-info TODO: sbolint: maybe? complain about backticks TODO: sbopkglint: maybe? change "forbidden" to: --- etc/ld.so.conf not allowed to exist in SBo packages. @@ -759,6 +759,8 @@ sub run_checks { # try to second-guess the user otherwise. push @checks, \&check_junkfiles if $checking_tarball; + push @checks, \¬_in_git if $in_git_repo; + for(@checks) { $_->($build); } @@ -1039,6 +1041,14 @@ sub check_info { $fixable++; } + if(/\t/) { + log_error("$file:$lineno: tab characters are not allowed"); + } + + if(/\r/) { + log_error("$file:$lineno: carriage returns (\\r) are not allowed"); + } + if(my ($k, $s1, $s2, $q1, $val, $q2) = /^(\w+)(\s*)=(\s*)("?)(.*?)("?)$/) { if(!grep { $k eq $_ } @expected) { log_error("$file:$lineno: invalid key '$k'"); @@ -1196,7 +1206,7 @@ sub curl_head_request { my $client_filename = $_[1]; $client_filename =~ s,.*/,,; - my @curlcmd = qw/curl --max-time 20 --head --location --silent --fail/; + my @curlcmd = qw/curl --max-time 60 --head --location --silent --fail/; push @curlcmd, $_[1]; open my $pipe, "-|", @curlcmd; @@ -1877,6 +1887,33 @@ sub check_junkfiles { # } } +# 20250114 bkw: if we're in a git repo and these files exist, but are +# not checked in to git, that generally means someone forgot to 'git +# add' them. +sub not_in_git { + open my $gitpipe, "git status --porcelain=2 . |"; + if(!$gitpipe) { + log_error("can't run 'git status' but we're in a git repo"); + return; + } + + while(<$gitpipe>) { + chomp; + + my ($file) = (/^\?\s(.*)/); + next unless $file; + + for($file) { + my $msg = "$file not in git repo, did you mean to add it?"; + if(/^.*\.(?:diff|patch|sh|desktop)/) { + log_warning($msg); + } else { + log_note($msg); + } + } + } +} + # if anything *.diff or *.patch contains \r, warn the # user about git stripping the \r's (better gzip it). # 20231223 bkw: this check relies on check_and_read special-casing |
