aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-06-09 15:39:27 -0400
committerB. Watson <urchlay@slackware.uk>2026-06-09 15:39:27 -0400
commit49b4daf9edec4b1aa4b41722b44f0d8d5bc70e99 (patch)
treedfa7731144954389bbb29891dd8b2256c6026f4f
parent792526bb2cf059faf98db28f7d06d92512076777 (diff)
downloadsbo-maintainer-tools-49b4daf9edec4b1aa4b41722b44f0d8d5bc70e99.tar.gz
Tweak commit hash detection in check_github_url() again.
-rwxr-xr-xsbolint6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbolint b/sbolint
index 8a35705..2595740 100755
--- a/sbolint
+++ b/sbolint
@@ -1338,10 +1338,8 @@ sub check_github_url {
$dir = $tag;
} elsif(@parts == 1) {
$tag = $dir = $parts[0];
- if($tag =~ /^[0-9a-f]{6,}$/ && $tag !~ /^\d{4,8}$/) {
- # commit hash. normally these are 7 hex digits, but a few
- # builds have a 6-digit one. The 2nd regex is to eliminate
- # dates used as tags.
+ if($tag =~ /^[0-9a-f]{6,}$/ && $tag !~ /^20\d{8,}/) {
+ # commit hash. the /^20\d{8,}/ is to exclude ISO dates like 20240402
if(length($tag) < 40) {
# shortened, maybe the full hash is in the filename?
if($filename =~ /([0-9a-f]{40})\./) {