From 3e0ecba85947ed7928b5da71b0122599f3f079d7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 24 Jun 2024 22:28:04 +0200 Subject: [PATCH] Report #REMOVEME? and # FIXMEhelpers2.1 flags as warnings --- package_linter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package_linter.py b/package_linter.py index 638cff7..211cdcf 100755 --- a/package_linter.py +++ b/package_linter.py @@ -2863,6 +2863,16 @@ class Script(TestSuite): "You should not be using 'rm -rf', please use 'ynh_secure_remove' instead" ) + @test() + def FIXMEs(self): + removeme = f"grep -q '#REMOVEME?' '{self.path}'" + fixme = f"grep -q '# FIXMEhelpers2.1' '{self.path}'" + + if os.system(removeme) == 0: + yield Warning("There are still some REMOVEME? flags to be taken care of") + if os.system(fixme) == 0: + yield Warning("There are still some FIXMEhelpers2.1 flags to be taken care of") + @test() def nginx_restart(self): if self.contains("systemctl restart nginx") or self.contains(