chiark / gitweb /
lint: also check for trailing spaces in names
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 31 Jan 2016 21:29:31 +0000 (21:29 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Sun, 31 Jan 2016 21:29:31 +0000 (21:29 +0000)
I was wrong - we don't check for trailing whitespaces on lines. That
would have to happen at parse time, not in the linter, so it would slow
things down and would become an error, not a warning. Not really worth
it.

fdroidserver/lint.py

index a5a8c655bf47d491bec047e83c2c6d654ea83637..ee4381c0f10c4a4a73adad3a71be4ebc9b6aa281 100644 (file)
@@ -77,6 +77,8 @@ regex_checks = {
     'Author Name': [
         (re.compile(r'^\s'),
          "Unnecessary leading space"),
+        (re.compile(r'.*\s$'),
+         "Unnecessary trailing space"),
     ],
     'License': [
         (re.compile(r'^(|None|Unknown)$'),