This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 165619e  Look for obvious syntax errors
165619e is described below

commit 165619e2f22cde9ea8ca1ff9e80263b77b9a7c2e
Author: Sebb <[email protected]>
AuthorDate: Tue Apr 27 17:14:54 2021 +0100

    Look for obvious syntax errors
---
 tools/download_check.rb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index 995fdca..b552ac4 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -401,6 +401,16 @@ def _checkDownloadPage(path, tlp, version)
     E "Page does not have enough links: #{links.size} < 6 -- perhaps it needs 
JavaScript?"
   end
 
+  if $CLI
+    puts "Checking link syntax"
+    links.each do |h, t|
+        if h =~ %r{^([a-z]{3,6})://}
+            W "scheme? %s %s" %  [h, t] unless %w(http https).include? $1
+        else
+            W "syntax? %s %s" % [h, t] unless h.start_with? '//'
+        end
+    end
+  end
   if $SHOW_LINKS
     links.each {|l| p l}
   end

Reply via email to