diff --git a/package_linter.py b/package_linter.py index b0fab72..a68d4f9 100755 --- a/package_linter.py +++ b/package_linter.py @@ -874,6 +874,14 @@ class Script(): if self.contains("source _common.sh") or self.contains("source ./_common.sh"): print_warning("In the context of backup and restore script, you should load _common.sh with \"source ../settings/scripts/_common.sh\"") + # Usage of ynh_script_prorgression with --time or --weight=1 all over the place... + if self.containsregex(r"ynh_script_progression.*--time"): + print_warning("Using ynh_script_progression --time should only be for calibrating the weight (c.f. --weight). It's not meant to be kept for production versions.") + if self.containsregex(r"ynh_script_progression.*--weight=1") and \ + not self.containsregex(r"ynh_script_progression.*--weight=([^1]|[1-9]{2})"): + print_warning("Having only '--weight=1' for ynh_script_progression is useless... Either calibrate the weights with --time once, or don't put any --weight at all.") + + def main(): if len(sys.argv) != 2: