This still is an issue in the current Cppcheck GUI. https://github.com/danmar/cppcheck/blob/0cc47a9dc1e0a790fdb5540c0851e31af57aeeed/gui/resultstree.cpp#L1259 Should be the following instead: const QString sinceDate = QLocale::system().toString(QDate::currentDate(), QLocale::ShortFormat); The currently used dateFormat just returns a local formating string for a date (dd.MM.yyyy in Germany).
Cppcheck 2.13.0 crashes with a STATUS_STACK_BUFFER_OVERRUN exception when running on a Visual Studio solution or project if one of the referenced files does not exist. Normally the file is created by a pre-build step that isn't executed by Cppcheck. Exception Analysis *** WARNING: Check Image - Checksum mismatch - Dump: 0x106d34, File: 0x1038b3 - C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll KEY_VALUES_STRING: 1 Key : Analysis.CPU.mSec Value: 967 Key : Analysis.Elapsed.mSec Value:...
The following simplified code compiles without any issue but causes an 'internalAstError'. I've verified it with Cppcheck 2.11 and 2.12.0. #include <limits> template <typename T> T min() { return std::numeric_limits<T>::min(); } class Test { public: using val_ptr = int*; void case1(val_ptr = val_ptr()) // Syntax Error: AST broken, binary operator '=' doesn't have two operands. { } void case2() { int min = ::min<int>(); // under some circumstances, the same internalAstError (void)min; } }; Under some...
Interestingly, the message sometimes is "There was a critical error with id 'internalAstError', when checking C:/path/to/file.cpp. Analysis was aborted." (same for 'syntaxError'), but I'm not entirely sure why the path is missing in other cases.
Thanks for the fix! I've just tested it with the nightly build #676 and it worked as expected.
After upgrading Cppcheck from v2.6 to v2.7 some of my (unchanged) solution files can no longer be read and generate the following error: cppcheck: error: Visual Studio solution file header not found cppcheck: error: failed to load project 'MyProjects.sln'. An error occurred. After inspecting the working and non-working solutions I've discovered that some of them were encoded as UTF-8-BOM and others without BOM and the absent byte order mark seems to break the parser. Both attached files were once...
Why should it? Even the linked validation schema shows that there can be zero or more occurences of <location>. Xml doesn't need an enclosing element for 'arrays', like e.g. Json does. I've parsed it successfully, written xsl styles (to HTML) for it and our used Jenkins plugin also can parse it. How are you trying to parse it? Maybe showing your implementation could help.
Why should it? Even the linked validation schema shows that there can be zero or more occurences of <location>. Xml doesn't need an enclosing element for 'arrays', like e.g. Json does. I've parsed it successfully, written xsl styles (to HTML) for it and our used Jenkins plugin also can parse it.