tests/.clang-tidy's header states, as a fact a reader is meant to rely on:
The clang-tidy-diff job installs ubuntu-24.04's catch2, 3.4.0, which
predates that comment -- which is why the finding reaches CI here and not on
a workstation with a current Catch2.
(The same sentence is repeated in examples/bank/tests/.clang-tidy and, per
scripts/check_rung_filters.sh, in the eight other examples/*/tests/
copies.)
The version is wrong. The runner's Catch2 is in the 3.5.x series.
Verification status
Measured from CI's own artifact, not reproduced by installing the package.
The clang-tidy-report artifact of run 35581623269 (PR #665, head
aa84b126) prints the runner's headers verbatim:
/usr/include/catch2/internal/catch_test_registry.hpp:121:35: note: expanded from macro 'INTERNAL_CATCH_TESTCASE'
121 | INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( dummyFunction ) )
dummyFunction exists only inside
#ifdef CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT, which Catch2 did
not have in 3.4.0 — it arrives in 3.5.0. In 3.4.0 the same macro names the
function CATCH2_INTERNAL_TEST_. A 3.4.0 runner could not print that line.
Three further line numbers in the same artifact match Catch2 3.5.3 exactly
(checked against the v3.5.3 tarball): catch_test_macros.hpp:142 is
#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ), and
catch_unique_name.hpp:12/13/15 are ..._LINE2 / ..._LINE /
INTERNAL_CATCH_UNIQUE_NAME.
Not verified: the exact package version. One line does not match 3.5.3 —
the artifact renders catch_test_registry.hpp:121 without the
, __VA_ARGS__ that upstream 3.5.3 carries there, so it may be a
distribution patch or a neighbouring 3.5.x point release. "3.5.x" is as far
as the evidence goes; apt-cache policy catch2 on an ubuntu-24.04 runner
would settle it in one line.
Why it is worth fixing rather than shrugging at
The sentence is not decoration: it is the stated reason a suppression exists,
and the reason a workstation is expected to disagree with CI. #666 is about
that disagreement being real and silent; this ticket is about the record of it
naming the wrong version, which is the first thing anyone chasing #666 would
try to reproduce against.
What would change the verdict
tests/.clang-tidy's header states, as a fact a reader is meant to rely on:(The same sentence is repeated in
examples/bank/tests/.clang-tidyand, perscripts/check_rung_filters.sh, in the eight otherexamples/*/tests/copies.)
The version is wrong. The runner's Catch2 is in the 3.5.x series.
Verification status
Measured from CI's own artifact, not reproduced by installing the package.
The
clang-tidy-reportartifact of run 35581623269 (PR #665, headaa84b126) prints the runner's headers verbatim:dummyFunctionexists only inside#ifdef CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT, which Catch2 didnot have in 3.4.0 — it arrives in 3.5.0. In 3.4.0 the same macro names the
function
CATCH2_INTERNAL_TEST_. A 3.4.0 runner could not print that line.Three further line numbers in the same artifact match Catch2 3.5.3 exactly
(checked against the v3.5.3 tarball):
catch_test_macros.hpp:142is#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ), andcatch_unique_name.hpp:12/13/15are..._LINE2/..._LINE/INTERNAL_CATCH_UNIQUE_NAME.Not verified: the exact package version. One line does not match 3.5.3 —
the artifact renders
catch_test_registry.hpp:121without the, __VA_ARGS__that upstream 3.5.3 carries there, so it may be adistribution patch or a neighbouring 3.5.x point release. "3.5.x" is as far
as the evidence goes;
apt-cache policy catch2on anubuntu-24.04runnerwould settle it in one line.
Why it is worth fixing rather than shrugging at
The sentence is not decoration: it is the stated reason a suppression exists,
and the reason a workstation is expected to disagree with CI. #666 is about
that disagreement being real and silent; this ticket is about the record of it
naming the wrong version, which is the first thing anyone chasing #666 would
try to reproduce against.
What would change the verdict
by the job itself rather than asserted in a comment, so it cannot go stale
the next time the runner image moves.
sentence then describes a pin rather than whatever apt happens to ship.
apt-cache policy catch2on the runner image reports 3.4.0after all, which would mean the artifact is being misread.