chiark / gitweb /
Make unspecified license use regex
authorDaniel Martí <mvdan@mvdan.cc>
Fri, 30 May 2014 16:48:35 +0000 (18:48 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 30 May 2014 16:52:30 +0000 (18:52 +0200)
fdroidserver/lint.py

index 65dc52d9ae7a9bc6bf10e366e3b0fd3ea6c099d7..5499d6e798abbdcec21ef9bd9bd27baa476250ff 100644 (file)
@@ -73,6 +73,10 @@ regex_warnings = {
         (re.compile(r'.*[^sS]://gitorious\.org/.*'),
          "gitorious URLs should always use https:// not http://"),
         ],
+    'License': [
+        (re.compile(r'^(|None|Unknown)$'),
+         "No license specified"),
+        ],
     'Description': [
         (re.compile(r'^No description available$'),
          "Description yet to be filled"),
@@ -98,9 +102,9 @@ regex_pedantic = {
         ],
     'Repo': [
         (re.compile(r'^http://.*'),
-         "if https:// is available, use it instead of http://"),
+         "use https:// if available"),
         (re.compile(r'^svn://.*'),
-         "if https:// is available, use it instead of svn://"),
+         "use https:// if available"),
         ],
     'Issue Tracker': [
         (re.compile(r'.*code\.google\.com/p/[^/]+/issues/.*'),
@@ -175,10 +179,6 @@ def main():
             pwarn("Last used commit '%s' looks like a tag, but Update Check Mode is '%s'" % (
                 lastcommit, app['Update Check Mode']))
 
-        # No proper license
-        if app['License'] in ('Unknown', 'None', ''):
-            warn("License was not set")
-
         # Summary size limit
         summ_chars = len(app['Summary'])
         if summ_chars > config['char_limits']['Summary']: