Report #REMOVEME? and # FIXMEhelpers2.1 flags as warnings

This commit is contained in:
Alexandre Aubin 2024-06-24 22:28:04 +02:00
parent a7367a3af8
commit 3e0ecba859

View file

@ -2863,6 +2863,16 @@ class Script(TestSuite):
"You should not be using 'rm -rf', please use 'ynh_secure_remove' instead" "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() @test()
def nginx_restart(self): def nginx_restart(self):
if self.contains("systemctl restart nginx") or self.contains( if self.contains("systemctl restart nginx") or self.contains(