mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Only check for ssowatconf at the end of the file, which is typically where it's useless
This commit is contained in:
parent
73741c225f
commit
1775202a26
1 changed files with 6 additions and 0 deletions
|
@ -596,8 +596,14 @@ class Script():
|
|||
print_warning("'yunohost app initdb' is deprecated. Please use 'ynh_mysql_setup_db' instead.")
|
||||
if self.contains("exit"):
|
||||
print_warning("'exit' command shouldn't be used. Please use 'ynh_die' instead.")
|
||||
|
||||
# Dirty hack to check only the 10 last lines for ssowatconf
|
||||
# (the "bad" practice being using this at the very end of the script, but some apps legitimately need this in the middle of the script)
|
||||
oldlines = list(self.lines)
|
||||
self.lines = self.lines[-10:]
|
||||
if self.contains("yunohost app ssowatconf"):
|
||||
print_warning("You probably don't need to run 'yunohost app ssowatconf' in the app script. It's supposed to be ran automatically after the script.")
|
||||
self.lines = oldlines
|
||||
|
||||
if self.contains("rm -rf"):
|
||||
print_error("[YEP-2.12] You should avoid using 'rm -rf', please use 'ynh_secure_remove' instead")
|
||||
|
|
Loading…
Add table
Reference in a new issue