From a8e5c7e67e75c73edb45c1ac0405817bd8088bcf Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 25 Nov 2023 15:15:01 +0100 Subject: [PATCH] Complain about using 'git clone' --- package_linter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package_linter.py b/package_linter.py index b61f41c..edda9cb 100755 --- a/package_linter.py +++ b/package_linter.py @@ -784,6 +784,12 @@ class App(TestSuite): % (custom_helper, official_helpers[custom_helper] or "?") ) + @test() + def git_clone_usage(app): + cmd = f"grep -I 'git clone' '{app.path}'/scripts/install '{app.path}'/scripts/_common.sh 2>/dev/null | grep -qv 'xxenv\|rbenv\|oracledb'" + if os.system(cmd) == 0: + yield Info("Using 'git clone' is not recommended ... most forge do provide the ability to download a proper archive of the code for a specific commit. Please use the 'sources' resource in the manifest.toml in combination with ynh_setup_source.") + @test() def helpers_version_requirement(app):