fix #13961: Additional information for inline suppression in XML output#7622
Merged
danmar merged 5 commits intocppcheck-opensource:mainfrom Jun 26, 2025
Merged
fix #13961: Additional information for inline suppression in XML output#7622danmar merged 5 commits intocppcheck-opensource:mainfrom
danmar merged 5 commits intocppcheck-opensource:mainfrom
Conversation
danmar
reviewed
Jun 24, 2025
danmar
reviewed
Jun 25, 2025
| if (extraPos != std::string::npos) { | ||
| extraComment = trim(comment.substr(extraPos + extraDelimiterSize)); | ||
| for (auto it = extraComment.begin(); it != extraComment.end();) | ||
| it = *it < 0 ? extraComment.erase(it) : it + 1; |
Collaborator
There was a problem hiding this comment.
do you assume that a char is signed here? that is not always true.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Collaborator
There was a problem hiding this comment.
I have a feeling that we should skip more characters. all control characters to start with. but well maybe that is a question for toxml instead.. and we don't have to solve that in this PR maybe.
Collaborator
Author
There was a problem hiding this comment.
As far as I can tell, the same characters need to be escaped in HTML as in XML, and toxml handles control characters, so should be good to go.
70eedd1 to
71d2327
Compare
danmar
approved these changes
Jun 26, 2025
winterz
pushed a commit
to winterz/cppcheck
that referenced
this pull request
Jun 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.