A few samples of using raw string literals which producing cppcheck errors.
// syntaxError: Invalid number of character (() when these macros are defined: ''.
static const char doubleQuotes[] = R"("Hello 'world!")";
// noQuoteCharPair: No pair for character("). Can't process file. File is either invalid or unicode, which is currently not supported.
static const char pattern1[] = R"( { "app" : "all" ,[^"]"id" : "%1" ,[^"]"type" : "%2" ,[^"]"path" : "%3"[^}]*})";
// syntaxError: Invalid number of character([) when these macros are defined : ''.
static const char pattern2[] = R"(("path"\s:\s")[^"]*("))";
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That seems to be fixed within the upcoming version 1.70 (within a few days). At least current git head doesn't complain about your code snippet anymore, while 1.69 does.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A few samples of using raw string literals which producing cppcheck errors.
// syntaxError: Invalid number of character (() when these macros are defined: ''.
static const char doubleQuotes[] = R"("Hello 'world!")";
// noQuoteCharPair: No pair for character("). Can't process file. File is either invalid or unicode, which is currently not supported.
static const char pattern1[] = R"( { "app" : "all" ,[^"]"id" : "%1" ,[^"]"type" : "%2" ,[^"]"path" : "%3"[^}]*})";
// syntaxError: Invalid number of character([) when these macros are defined : ''.
static const char pattern2[] = R"(("path"\s:\s")[^"]*("))";
That seems to be fixed within the upcoming version 1.70 (within a few days). At least current git head doesn't complain about your code snippet anymore, while 1.69 does.