Skip to content

fix #13961: Additional information for inline suppression in XML output #7622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 26, 2025

Conversation

ludviggunne
Copy link
Collaborator

No description provided.

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;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you assume that a char is signed here? that is not always true.

This comment was marked as resolved.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ludviggunne ludviggunne force-pushed the 13961 branch 2 times, most recently from 70eedd1 to 71d2327 Compare June 26, 2025 07:55
@danmar danmar merged commit 542da04 into danmar:main Jun 26, 2025
53 checks passed
@ludviggunne ludviggunne deleted the 13961 branch June 26, 2025 10:46
winterz pushed a commit to winterz/cppcheck that referenced this pull request Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants