Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes Cppcheck warnings #1759
Comments
This comment has been minimized.
This comment has been minimized.
|
PS: I don't know is this issue should be flagged as a feature request or as anything else, so I made it a regular issue. |
Merged
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
If I remove the warnings on non-explicit constructors (which are not a bug, but a feature for this library), we are left with the following issues:
PRs welcome! |
This comment has been minimized.
This comment has been minimized.
|
And even nicer than a PR fixes these issues would be adding the cppcheck to CI so that the codebase stays clean as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @nlohmann and other mainteners,
First of all, I must say that I love your work on this librairy.❤️
It feels really easy to use, and to read code using this library !
I have created this issue to talk about the warnings that cppcheck found on this project.
I'm currently experimenting with both this library and cppcheck on some little side projects. And doing so, I've ended up with cppcheck warnings me about some elements inside the json library.
So the purpose of this issue is to talk about the warnings from cppcheck, to address them when they are relevant, so that other people which are going to have both this library and cppcheck] in their project, as little as warnings as possible.
Here is the list of the warnings I've got for now:
Some of them may be false positive, but others can be relevant, so this is why I've made this issue. The good news, is that all the warnings I have got are flagged as "style", not as error or warning, so their are less likely to bother most of people using cppcheck.😄
If we successly correct all the warnings (and silence the false positive), we may even imagine adding cppcheck to the CI of the library.🤞
Let me know what you think about this idea. If you agree with the purpose of this issue, I'll gladly help to reach it.
For technical information, I've used the version 1.87 of cppcheck on the version 3.7.0 of the json library, on Windows, with Visual Studio 2017. You can find the repository on which I'm currently running this here
In a few minutes, I will also add a Pull Request which handles the warnings🔜
6and29.