Fix: Merge messages if all level 0 in C++ (matching python) #436
+3
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change will align how the C++ and python merge summary functionality works. (
diagnostics/diagnostic_updater/diagnostic_updater/_diagnostic_status_wrapper.py
Line 116 in 484cca0
In python, if both messages have level "OK" or if both messages are "not OK" then the message text will get merged. Otherwise, the "OK" message will be overwritten with the "not OK" message. This operation makes sense to me as the intended outcome.
However, in C++ the messages were only getting merged if they were both "not OK". In the situation where both messages were "OK", only the first message was being captured and shown.