From aaad725ac0cce1fa66c9e7ce3f6c06c201f48b2e Mon Sep 17 00:00:00 2001 From: Georgia Garcia Date: Tue, 30 Apr 2024 18:28:16 -0300 Subject: [PATCH] apparmor.systemd: fix shellcheck false positive Shellcheck is complaining that some of the functions are never called, but they are called from rc.apparmor.functions, causing a false positive. This issue only appears in shellcheck version 0.9.0, which is the one used in ubuntu 24.04, that's why it only failed in the pipeline now. Fixes: https://gitlab.com/apparmor/apparmor/-/issues/388 Signed-off-by: Georgia Garcia --- parser/apparmor.systemd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/parser/apparmor.systemd b/parser/apparmor.systemd index 09d579245..ccdad3b49 100644 --- a/parser/apparmor.systemd +++ b/parser/apparmor.systemd @@ -17,6 +17,8 @@ APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_action() { echo "$1" @@ -25,36 +27,50 @@ aa_action() return $? } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_warning_msg() { echo "Warning: $*" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_failure_msg() { echo "Error: $*" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_action_start() { echo "$@" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_action_end() { printf "" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_daemon_msg() { echo "$@" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_skipped_msg() { echo "Skipped: $*" } +# This function is used in rc.apparmor.functions +# shellcheck disable=SC2317 aa_log_end_msg() { printf ""