mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Report usage of ynh_exec_* and wrapping the command between quotes
This commit is contained in:
parent
92066d640f
commit
28c515fe5e
1 changed files with 7 additions and 1 deletions
|
@ -2005,10 +2005,16 @@ class Script(TestSuite):
|
|||
"Please consider using 'ynh_add_config' to handle config files instead of gazillions of manual cp + 'ynh_replace_string' + chmod"
|
||||
)
|
||||
|
||||
@test()
|
||||
def bad_ynh_exec_syntax(self):
|
||||
cmd = 'grep -q -IhEro "ynh_exec_(err|warn|warn_less|quiet|fully_quiet) (\\"|\')" %s' % self.path
|
||||
if os.system(cmd) == 0:
|
||||
yield Info("(Requires Yunohost 4.3) When using ynh_exec_*, please don't wrap your command between quotes (typically DONT write ynh_exec_warn_less 'foo --bar --baz')")
|
||||
|
||||
@test()
|
||||
def ynh_add_fpm_config_deprecated_package_option(self):
|
||||
if self.containsregex(r'ynh_add_fpm_config .*package=.*'):
|
||||
yield Info("Since Yunohost 4.3, option --package for ynh_add_fpm_config is deprecated : please use 'ynh_install_app_dependencies' with **all** your apt dependencies instead (no need to define a special 'extra_php_dependencies'). YunoHost will automatically install any phpX.Y-fpm / phpX.Y-common if needed.")
|
||||
yield Info("(Requires Yunohost 4.3) Option --package for ynh_add_fpm_config is deprecated : please use 'ynh_install_app_dependencies' with **all** your apt dependencies instead (no need to define a special 'extra_php_dependencies'). YunoHost will automatically install any phpX.Y-fpm / phpX.Y-common if needed.")
|
||||
|
||||
@test()
|
||||
def set_is_public_setting(self):
|
||||
|
|
Loading…
Reference in a new issue