Skip to content

Commit

Permalink
Misc fixes + some apps are using rm -fR or -Rf instead of -rf, which …
Browse files Browse the repository at this point in the history
…wasnt caught by linter...
  • Loading branch information
alexAubin committed Nov 9, 2020
1 parent e3dcea7 commit 4b513b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions package_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def app_in_github_org(self):

if repo_url.lower() not in [repo_org.lower(), repo_brique.lower()]:
if repo_url.lower().startswith("https://github.com/YunoHost-Apps/"):
yield Warning("The url for this app in the catalog should be ")
yield Warning("The url for this app in the catalog should be %s" % repo_org)
else:
yield Warning("Consider adding your app to the YunoHost-Apps organization to allow the community to contribute more easily")

Expand Down Expand Up @@ -1011,11 +1011,13 @@ def obsolete_helpers(self):
yield Error("'yunohost app checkport' is obsolete!!! Please use 'ynh_find_port' instead.")
if self.contains("yunohost app initdb"):
yield Error("'yunohost app initdb' is obsolete!!! Please use 'ynh_mysql_setup_db' instead.")
if self.contains("yunohost tools port-available"):
yield Error("'yunohost tools port-available is obsolete!!! Please use 'ynh_port_available' instead.")

@test()
def safe_rm(self):
if self.contains("rm -rf"):
yield Error("You should avoid using 'rm -rf', please use 'ynh_secure_remove' instead")
if self.contains("rm -r") or self.contains("rm -R") or self.contains("rm -fr") or self.contains("rm -fR"):
yield Error("You should not be using 'rm -rf', please use 'ynh_secure_remove' instead")

@test()
def nginx_restart(self):
Expand All @@ -1034,7 +1036,6 @@ def argument_fetching(self):
" domain=$1 ...) Instead, use name=$YNH_APP_ARG_NAME"
)


@test(only=["install"])
def sources_list_tweaking(self):
if self.contains("/etc/apt/sources.list") \
Expand Down

0 comments on commit 4b513b4

Please sign in to comment.