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 up
Hi @nlohmann and other mainteners,
First of all, I must say that I love your work on this librairy.
I have created this issue to talk about the warnings that cppcheck found on this project.
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
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: