From cd396af50ee481ce79b57ad6b8ab427e47298342 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Oct 2020 16:40:04 +0200 Subject: [PATCH] Fix some false-negative about exit usage + report it as error --- package_linter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package_linter.py b/package_linter.py index d1ef925..0cbe5a7 100755 --- a/package_linter.py +++ b/package_linter.py @@ -951,8 +951,8 @@ class Script(TestSuite): @test() def exit_ynhdie(self): - if self.contains("exit"): - yield Warning("'exit' command shouldn't be used. Please use 'ynh_die' instead.") + if self.contains(r"\bexit\b"): + yield Error("'exit' command shouldn't be used. Please use 'ynh_die' instead.") @test() def old_regenconf(self):