For a couple of weeks cppcheck stopped working for me. Every JSON Compilation Database file I pass to cppcheck is rejected by a syntax error. It is always the last square bracket. The JSON files are created by CMake 4.2, 4.3, and Bear 3.1.6. Even if I try to create a trivial JSON file by hand, I get the error.
I tried with 2.19, 2.20 and main. Nothing works. In the past, 2.19 was working. To make things more mysterious, for main I ran ctest and all tests passed.
Any idea how to pinpoint the cause of my issue?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For a couple of weeks cppcheck stopped working for me. Every JSON Compilation Database file I pass to cppcheck is rejected by a syntax error. It is always the last square bracket. The JSON files are created by CMake 4.2, 4.3, and Bear 3.1.6. Even if I try to create a trivial JSON file by hand, I get the error.
I tried with 2.19, 2.20 and main. Nothing works. In the past, 2.19 was working. To make things more mysterious, for main I ran
ctestand all tests passed.Any idea how to pinpoint the cause of my issue?
You could set a breakpoint on the syntax error and check what is causing it. Maybe an encoding issue?