mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Rework message about weight of the screenshot dir + report it as a warning if higher than 1MB (10ish apps at the moment)
This commit is contained in:
parent
c35e07b47f
commit
de9c6aa320
1 changed files with 6 additions and 2 deletions
|
@ -661,9 +661,13 @@ class App(TestSuite):
|
|||
["du", "-sb", app.path + "/doc/screenshots"], shell=False
|
||||
)
|
||||
screenshots_size = int(du_output.split()[0])
|
||||
if screenshots_size > 512000:
|
||||
if screenshots_size > 1024 * 1000:
|
||||
yield Warning(
|
||||
"Please keep the content of doc/screenshots under ~512Kb. Having screenshots bigger than 512kb is probably a waste of resource and will take unecessarily long time to load on the webadmin UI and app catalog."
|
||||
)
|
||||
elif screenshots_size > 512 * 1000:
|
||||
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)"
|
||||
"Please keep the content of doc/screenshots under ~512Kb. Having screenshots bigger than 512kb is probably a waste of resource and will take unecessarily long time to load on the webadmin UI and app catalog."
|
||||
)
|
||||
|
||||
for _, _, files in os.walk(os.path.join(app.path, "doc/screenshots")):
|
||||
|
|
Loading…
Reference in a new issue