Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented May 2, 2025

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented May 2, 2025

Requires #7502 to be merged first.

@chrchr-github
Copy link
Collaborator

errornormally means that there is UB or something like a memory leak. This is not the case for at least some of the bugprone-* checks: https://clang.llvm.org/extra/clang-tidy/checks/list.html
But then I don't know why anyone would use cppcheck to invoke clang-tidy in the first place.

@firewave
Copy link
Collaborator Author

firewave commented May 2, 2025

errornormally means that there is UB or something like a memory leak. This is not the case for at least some of the bugprone-* checks: https://clang.llvm.org/extra/clang-tidy/checks/list.html

Fair enough. But we should at least map them to warning.

lib/cppcheck.cpp Outdated
errmsg.severity = Severity::performance;
else if (startsWith(id, "portability-"))
errmsg.severity = Severity::portability;
else if (startsWith(id, "cert-") || startsWith(id, "misc-") || startsWith(id, "unused-"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The last one needs to check if the ID contains -unused-.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@firewave firewave changed the title fixed #13829 - mapped bugprone-* clang-tidy findings to error fixed #13829 - mapped bugprone-* clang-tidy findings to warning May 6, 2025
@firewave
Copy link
Collaborator Author

firewave commented May 6, 2025

Fair enough. But we should at least map them to warning.

Done.

@firewave firewave marked this pull request as ready for review May 6, 2025 12:31
@firewave
Copy link
Collaborator Author

firewave commented May 6, 2025

Ugh - I messed up the separate commits. But should be fine.

@firewave firewave merged commit e76ec8d into danmar:main May 6, 2025
53 checks passed
@firewave firewave deleted the tidy-bugprone branch May 6, 2025 15:19
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.

3 participants