Skip to content

Commit

Permalink
Report #REMOVEME? and # FIXMEhelpers2.1 flags as warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexAubin committed Jun 24, 2024
1 parent a7367a3 commit 3e0ecba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2863,6 +2863,16 @@ def safe_rm(self):
"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(
Expand Down

0 comments on commit 3e0ecba

Please sign in to comment.