From 0e5c8a45046988f4b6cf0a50001b0dc66fd35a8a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Jan 2021 18:51:58 +0100 Subject: [PATCH] Report default/placeholder help string + remaining REPLACEBYYOURAPP --- package_linter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package_linter.py b/package_linter.py index d08e789..4cf5cfc 100755 --- a/package_linter.py +++ b/package_linter.py @@ -436,6 +436,16 @@ class App(TestSuite): % (id_, id_) ) + @test() + def placeholder_help_string(self): + if os.system("grep -q 'Use the help field' %s/manifest.json 2>/dev/null" % self.path) == 0: + yield Warning("Sounds like your manifest.json contains some default placeholder help string ('Use the help field to...') ... either replace it with an actually helpful explanation, or remove the help string entirely if you don't use it.") + + @test() + def remaining_replacebyyourapp(self): + if os.system("grep -qr 'REPLACEBYYOURAPP' %s 2>/dev/null" % self.path) == 0: + yield Warning("You should replace all occurences of REPLACEBYYOURAPP.") + ####################################### # _ _ _ # # | | | | | | #