4 // Comments should not generate violations
6 // This comment,a single line comment,is missing a space after its commas.
8 // Single-quoted commas should not generate a violation
10 static char comma_char_1 = ',';
12 // Double-quoted commas should not generate a violation
14 static const char * const comma_string_1 = ",";
15 static const char * const comma_string_2 = "tag,value";
16 static const char * const comma_string_3 = "\"tag\",\"value\"";
17 static const char * const comma_string_4 = "'tag','value'";
18 static const char * const comma_string_5 = "size=\"17,11\"";
20 // Single-quoted escaped single quotes with commas should not generate a violation
22 static wchar_t charsets[] =
24 L'\'', L'<', L'>', L'?', L',', L'.', L'/', L'`', L'Ä', L'Ö', L'Ü', L'Ç', L'Ñ', L'É', L'À', L'Å', L'Æ', L'~'
28 * This comment,a multi- line comment,
29 * is missing a space after its commas.
30 * However, only the one that is not at the
31 * end of the line should be flagged.
34 static int array_1[] = {0,1,2,3,4,5}; // These should generate a violation
35 static int array_2[] = {0, // End of line, these should not
36 1, // generate a violation.
42 extern void foo(void);
44 void test_1(int m, int n)
46 for (int i = 0,j = 0; i < m && j < n; i++,j++) {
54 test_2(void) : m_a(0),m_b(0) { return; }
55 test_2(int a, int b) :