YunoHost / package_linter

Linter for YunoHost applications packages
https://yunohost.org/#/packaging_apps
GNU Affero General Public License v3.0
17 stars 13 forks source link

Add test of common file #56

Closed Mickael-Martin closed 5 years ago

Mickael-Martin commented 5 years ago

To add a check for the present of the source of _common.sh file. Check if duplicate, absent or not correct (execution context). Ref https://github.com/YunoHost/package_linter/issues/50

alexAubin commented 5 years ago

Planning to merge in a few days ... any feedback welcome

alexAubin commented 5 years ago

Yolomergin' (still feel free to complain if you see an issue with this PR ;^p)

maniackcrudelis commented 5 years ago

To print a warning about that, why not. But do not pop an error for that test. If a _common.sh isn't sourced correctly, bash will failed, which is enough to raise an error.

But to use source ./_common.sh isn't always an error. In Discourse, there's no error about it, https://github.com/YunoHost-Apps/discourse_ynh/blob/master/scripts/backup#L8-L13

alexAubin commented 5 years ago

@maniackcrudelis : Should be fixed by https://github.com/YunoHost/package_linter/commit/9181e08814182c6db686296de48524a24831bec6