From 7ed28fc4985a9da6fb9561811b55243168a3766d Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Mon, 26 Dec 2022 03:17:49 +0100 Subject: [PATCH] Specify which action a sanity warning is emitted for When emitting warnings about action enablers, include the action name in the message (unfortunately, we currently don't store the enabler section name). This gives some context to messages that would previously look like: This action enabler is never used by any unit. --- server/rssanity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/rssanity.cpp b/server/rssanity.cpp index fa46f74dbc..36ff87e227 100644 --- a/server/rssanity.cpp +++ b/server/rssanity.cpp @@ -1228,7 +1228,8 @@ bool sanity_check_ruleset_data(bool ignore_retired) problem = action_enabler_suggest_improvement(enabler); if (problem != nullptr) { // There is a potential for improving this enabler. - qCWarning(deprecations_category, "%s", problem->description); + qCWarning(deprecations_category, "Enabler for action %s: %s", + action_id_rule_name(act), problem->description); } } }