chiark / gitweb /
lint: complain if link url isn't a url
authorDaniel Martí <mvdan@mvdan.cc>
Fri, 28 Aug 2015 21:23:30 +0000 (14:23 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 28 Aug 2015 21:23:30 +0000 (14:23 -0700)
Moving this check from metadata into lint is perhaps overkill, but at least it
doesn't break fdroid update because of the maintainer notes.

fdroidserver/lint.py

index f51e85bd8140e4752a1080f275f6d76ea87cbeab..b5ad2970dbebf12ec32e4be402432db2fcd2c9f8 100644 (file)
@@ -103,6 +103,8 @@ regex_warnings = {
          "Unnecessary leading space"),
         (re.compile(r'.*\s$'),
          "Unnecessary trailing space"),
+        (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'),
+         "Invalid link - use [http://foo.bar Link title] or [http://foo.bar]"),
     ],
 }