From ee46f76b04f70b98669fce3d9b9bbccbd3f7e0a9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 6 May 2022 21:08:58 +0200 Subject: [PATCH] Advice to keep doc/screenshot under ~512Kb --- package_linter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package_linter.py b/package_linter.py index 6dc8aee..15ced81 100755 --- a/package_linter.py +++ b/package_linter.py @@ -515,6 +515,12 @@ class App(TestSuite): - If relevant for this app, screenshots can be added in a doc/screenshots/ folder.""" ) + if os.path.exists(app.path + "/doc/screenshots"): + du_output = subprocess.check_output(["du", "-sb", app.path + "/doc/screenshots"], shell=False) + screenshots_size = int(du_output.split()[0]) + if screenshots_size > 512000: + yield Info("Consider keeping the content of doc/screenshots under ~512Kb for better UI/UX once the screenshots will be integrated in the webadmin app's catalog (to be discussed with the team)") + @test() def disclaimer_wording(app): if os.path.exists(app.path + "/doc"):