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

Warning on usage of IS_PACKAGE_CHECK #80

Open maniackcrudelis opened 4 years ago

maniackcrudelis commented 4 years ago

I see too many times the solution of an if on $PACKAGE_CHECK_EXEC to pass tests on package check...

While using $PACKAGE_CHECK_EXEC can be completely relevant, this is often seen as a simple way to pass falling tests.

I thought about matching it from Package_check, but it's clearly more relevant to match it from linter.

I know of 3 different way to avoid test in package check

uname -n | grep -c 'pchecker_lxc'
env | grep -c container=lxc
$PACKAGE_CHECK_EXEC

Often used behind the name IS_PACKAGE_CHECK

A warning should be added for such an usage of ways to avoid tests. But only warning as it can be relevant and some apps do actually need that to be tested.