From 81ddabf58054966d2cf7e29b0712fa8a6d84fada Mon Sep 17 00:00:00 2001 From: Moul Date: Thu, 3 Nov 2016 19:42:00 +0100 Subject: [PATCH] [enh] handle checking extra script file containing functions. --- package_linter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index a023a02..cc6447f 100755 --- a/package_linter.py +++ b/package_linter.py @@ -214,7 +214,11 @@ if __name__ == '__main__': header(app_path) check_files_exist(app_path) check_manifest(app_path + "/manifest.json") - i, scripts = 0, ("install", "remove", "upgrade", "backup", "restore") + i, scripts = 0, ["install", "remove", "upgrade", "backup", "restore"] + for (dirpath, dirnames, filenames) in os.walk(os.path.join(app_path, "scripts")): + for filename in filenames: + if filename not in scripts: + scripts.append(filename) while i < len(scripts): check_script(app_path, scripts[i]) i += 1