diff --git a/package_linter.py b/package_linter.py index 116ef4a..f39aad8 100755 --- a/package_linter.py +++ b/package_linter.py @@ -581,11 +581,11 @@ class App(): # YEP 1.8 Publish test request # YEP 1.9 Document app if "description" in manifest: - descr = manifest["description"] + descr = manifest.get("description", "") if isinstance(descr, dict): - descr = descr.get("en", None) + descr = descr.get("en", "") - if descr is None or descr == "" or descr == manifest.get("name", None): + if len(descr) < 5: print_warning( "[YEP-1.9] You should write a good description of the app, " "at least in english (1 line is enough)." @@ -596,12 +596,14 @@ class App(): "[YEP-1.9] Please use a shorter description (or the rendering on the webadmin / app list will be messy ...). Just describe in consise terms what the app is / does." ) - elif "for yunohost" in descr.lower(): + elif "for yunohost" in descr.lower() : print_warning( "[YEP-1.9] The 'description' should explain what the app actually does. " "No need to say that it is 'for YunoHost' - this is a YunoHost app " "so of course we know it is for YunoHost ;-)." ) + if descr.lower().startswith(manifest["id"].lower()) or descr.lower().startswith(manifest["name"].lower()): + print_warning("[YEP-1.9] Try to avoid starting the description by '$app is' ... explain what the app is / does directly !") # TODO test a specific template in README.md