Skip to content

Commit 823b010

Browse files
committed
C++: Mark FPs that are hard to solve w/o source code
1 parent 0128b17 commit 823b010

File tree

1 file changed

+6
-6
lines changed
  • cpp/ql/test/query-tests/Best Practices/Likely Errors/CommaBeforeMisleadingIndentation

1 file changed

+6
-6
lines changed

cpp/ql/test/query-tests/Best Practices/Likely Errors/CommaBeforeMisleadingIndentation/test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@ int test(int i, int j, int (*foo)(int), int (*bar)(int, int))
8888

8989
// Mixed tabs and spaces (ugly case):
9090

91-
for (i = 0, // GOOD if tab >= 4 spaces else BAD
91+
for (i = 0, // GOOD if tab >= 4 spaces else BAD -- can't exclude w/o source code text :/
9292
j = 0;
9393
i + j < 10;
94-
i++, // GOOD if tab >= 4 spaces else BAD
94+
i++, // GOOD if tab >= 4 spaces else BAD -- can't exclude w/o source code text :/
9595
j++);
9696

9797
if (i)
98-
(void)i, // GOOD if tab >= 4 spaces else BAD
98+
(void)i, // GOOD if tab >= 4 spaces else BAD -- can't exclude w/o source code text :/
9999
(void)j;
100100

101101
// One char difference (common but borderline):
102102

103-
for (i = 0, // GOOD? [FALSE POSITIVE]
103+
for (i = 0, // GOOD? [FALSE POSITIVE] -- can't exclude w/o source code text :/
104104
j = 1;
105105
i + j < 10;
106106
i++, j++);
107107

108108
for (i = 0,
109-
j = 1; i < 10; i += 2, // GOOD? [FALSE POSITIVE]
109+
j = 1; i < 10; i += 2, // GOOD? [FALSE POSITIVE] -- can't exclude w/o source code text :/
110110
j++) {}
111111

112112
// LHS ends on same line RHS begins on:
@@ -119,7 +119,7 @@ int test(int i, int j, int (*foo)(int), int (*bar)(int, int))
119119

120120
if (foo(j))
121121
return i++
122-
, i++ // GOOD(?) [FALSE POSITIVE]
122+
, i++ // GOOD(?) [FALSE POSITIVE] -- can't exclude w/o source code text :/
123123
? 1
124124
: 2;
125125

0 commit comments

Comments
 (0)