Skip to content

Commit 6292b70

Browse files
authored
Explain linting suppressions (#5790)
* Reduce NOLINT * Revert "Reduce NOLINT" This reverts commit 96593d3. * Explain NOLINT We explicitly want to test copying the argument.
1 parent 94c8250 commit 6292b70

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_copy_move.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,9 @@ TEST_SUBMODULE(copy_move_policies, m) {
193193

194194
// test_move_and_copy_loads
195195
m.def("move_only", [](MoveOnlyInt m) { return m.value; });
196-
// Changing this breaks the existing test: needs careful review.
197-
// NOLINTNEXTLINE(performance-unnecessary-value-param)
196+
// NOLINTNEXTLINE(performance-unnecessary-value-param): we want to test copying
198197
m.def("move_or_copy", [](MoveOrCopyInt m) { return m.value; });
199-
// Changing this breaks the existing test: needs careful review.
200-
// NOLINTNEXTLINE(performance-unnecessary-value-param)
198+
// NOLINTNEXTLINE(performance-unnecessary-value-param): we want to test copying
201199
m.def("copy_only", [](CopyOnlyInt m) { return m.value; });
202200
m.def("move_pair",
203201
[](std::pair<MoveOnlyInt, MoveOrCopyInt> p) { return p.first.value + p.second.value; });

0 commit comments

Comments
 (0)