Skip to content

Commit

Permalink
Specify which action a sanity warning is emitted for
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lmoureaux authored and jwrober committed Dec 26, 2022
1 parent 6b38fad commit 7ed28fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/rssanity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 7ed28fc

Please sign in to comment.