From 43523543e03c6fcf0ae29df4a534b4df5f80a5d3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 3 Nov 2020 17:45:17 +0100 Subject: [PATCH] Add a check that yunohost required version is not 2.x --- package_linter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package_linter.py b/package_linter.py index 53f0222..1bccad1 100755 --- a/package_linter.py +++ b/package_linter.py @@ -666,6 +666,13 @@ class Manifest(TestSuite): if not self.manifest.get("requirements", {}).get("yunohost", ""): yield Error("You should add a yunohost version requirement in the manifest") + @test() + def yunohost_version_requirement_superold(app): + + yunohost_version_req = app.manifest.get("requirements", {}).get("yunohost", "").strip(">= ") + if yunohost_version_req.startswith("2."): + yield Error("Your app only requires yunohost >= 2.x, which tends to indicate that your app may not be up to date with recommended packaging practices and helpers.") + @test() def basic_fields_format(self):