Skip to content

Commit 2317f1b

Browse files
Fix test comments for shared query vs A0-1-4, Rule 0.2.2
1 parent 7105e17 commit 2317f1b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
| test.cpp:8:22:8:22 | x | Unused parameter 'x' for function $@. | test.cpp:8:6:8:16 | test_unused | test_unused |
22
| test.cpp:16:14:16:14 | x | Unused parameter 'x' for function $@. | test.cpp:16:8:16:8 | b | A::b |
3-
| test.cpp:21:22:21:22 | x | Unused parameter 'x' for function $@. | test.cpp:21:16:21:16 | d | A::d |
4-
| test.cpp:21:29:21:29 | y | Unused parameter 'y' for function $@. | test.cpp:21:16:21:16 | d | A::d |
5-
| test.cpp:38:14:38:14 | y | Unused parameter 'y' for function $@. | test.cpp:37:9:37:9 | operator() | lambda expression |
3+
| test.cpp:22:22:22:22 | x | Unused parameter 'x' for function $@. | test.cpp:22:16:22:16 | d | A::d |
4+
| test.cpp:22:29:22:29 | y | Unused parameter 'y' for function $@. | test.cpp:22:16:22:16 | d | A::d |
5+
| test.cpp:39:14:39:14 | y | Unused parameter 'y' for function $@. | test.cpp:38:9:38:9 | operator() | lambda expression |

cpp/common/test/rules/unusedparameter/test.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ class A {
1616
void b(int x) {} // NON_COMPLIANT
1717
void c(int) {} // COMPLIANT
1818

19-
// This is a violation of A0-1-4, but not a violation of Rule 0-2-2, so it's
20-
// accepted by the default shared logic. See A0-1-4 tests for coverage.
21-
virtual void d(int x, int y) {} // COMPLIANT
19+
// This is a violation of Rule 0-2-2, and therefore flagged by the default
20+
// logic. However, this allowed by additional exception in A0-1-4. See A0-1-4
21+
// and Rule 0-2-2 tests for full coverage.
22+
virtual void d(int x, int y) {} // NON_COMPLIANT
2223
};
2324

2425
void f(

0 commit comments

Comments
 (0)