Repository navigation
Description
Summary
The testing plugin's cannot-fail scanner (/testing:audit, and the test-scan and test-weaken hooks that run the same engine) covers JS/TS, Python, C#, Bash, PowerShell and Go. C++ test files are never enumerated, so a GoogleTest or Catch2 test with no assertion, or one that can only pass, goes unreported and the hooks never fire on a C++ test edit. Add a C++ adapter for GoogleTest and Catch2.
Assertion forms to recognize:
- GoogleTest:
EXPECT_*andASSERT_*macro pairs, with families_TRUE/_FALSE,_EQ/_NE/_LT/_LE/_GT/_GE,_STREQ,_FLOAT_EQ/_NEAR,_THATwith matchers,_THROW/_NO_THROW,_PRED1to_PRED5, and death tests, per the GoogleTest docs: https://google.github.io/googletest/reference/assertions.html - Catch2:
REQUIREandCHECKmacro pairs, plus_FALSE,_NOTHROW,_THROWS,_THROWS_AS,_THROWS_WITH,_THROWS_MATCHESand_THATvariants, per the Catch2 docs: https://github.com/catchorg/Catch2/blob/devel/docs/assertions.md
The fatal and nonfatal forms (ASSERT_/EXPECT_, REQUIRE/CHECK) are the same assertion with different abort behaviour; both count. Each is one ;-terminated statement, the shape the C# and JS adapters already split on.
Scope
plugins/testing/skills/audit/adapters/cpp-googletest.yamlandcpp-catch2.yaml:files:globs (for example*_test.cc,*_test.cpp,*Test.cpp,*Tests.cpp,test_*.cpp; confirm against each framework's conventions),test_startforTEST(,TEST_F(,TEST_P(,TYPED_TEST(and Catch2'sTEST_CASE(,SCENARIO(,SECTION(,test_skip(DISABLED_name prefix,GTEST_SKIP(), Catch2[.]and[!mayfail]tags,SKIP(), and the assertion, weak, inert (EXPECT_TRUE(true),REQUIRE(true)), count, fail (FAIL(),ADD_FAILURE()) and mock (gMockEXPECT_CALL) token sets.- Masker: reuse
mask_csinplugins/testing/skills/audit/scripts/cant-fail-scan.awk(//and/* */comments,"and'literals) with C++ raw stringsR"delim(...)delim", which may span lines, and without C#'s@"and$"prefixes; addmask_cppif that cannot sharemask_cscleanly, register it inmask_open, and routelanguage: cppto it. - Corpus fixtures under
plugins/testing/skills/audit/evals/fixtures/corpus/<adapter-id>/{bad,good}/(stored as.fixture), each listed incorpus_filesincant-fail-scan.test.sh. - Regenerate
plugins/testing/hooks/hooks.jsonwithplugins/testing/scripts/gen-hook-filters.shso the hooks'ifrows include the new globs. - Add C++ to the language lists in
plugins/testing/skills/audit/SKILL.md(description and ecosystems paragraph) andplugins/testing/README.md. - Version bump and CHANGELOG entry for testing.
Acceptance criteria
- A GoogleTest
TEST(...)and a Catch2TEST_CASE(...)with no assertion each reportrule-zero-assertion. - A test with one real
EXPECT_EQ/ASSERT_EQorREQUIRE/CHECKreports nothing. - Two assertions on one line (
EXPECT_EQ(a, 1); EXPECT_TRUE(true);) are classified per statement: the inert second statement is reported. - An assertion macro name inside an
R"(...)"raw string, including one spanning lines, or inside a comment does not count as an assertion. - A disabled test (
DISABLED_prefix, Catch2[.]tag) is not reported as zero-assertion. - Every new fixture is in
corpus_files, andcant-fail-scan.test.shandcheck-corpus-grid.shpass. -
gen-hook-filters.sh --checkpasses after regeneration, andgen-hook-filters.test.shpasses.
Dependencies
Land after the in-flight scanner PR for #6211, #6218 and #6040, since all of them edit cant-fail-scan.awk, the corpus list and hooks.json. Run the four language adapters (Kotlin, C++, PHP, Ruby) one at a time for the same reason.
Rough size
Small to medium if mask_cs can be reused with a raw-string addition. Assertions are macros with fixed names and ; terminators, so the token sets are the simplest of the four languages; Catch2's nested SECTION blocks are the part to check against the block model.
Activity
github-actions commentedon Oct 4, 2026
Triage: this requests a new C++ adapter (GoogleTest and Catch2) for the cannot-fail scanner, covering the test_start/test_skip/assertion/weak/inert/count/fail/mock token sets, a masker update for raw strings, new corpus fixtures, regenerated hook filters, and doc/version updates. The scope, acceptance criteria, and sequencing (land after #6211, #6218, #6040, and run one adapter at a time alongside the sibling Kotlin/#6235, PHP/#6237, and Ruby/#6238 adapter issues) are already spelled out, so nothing appears missing here. No duplicate open issues were found.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Owner decision (2026-10-13): approved the recommendation.
Basis: git ls-tree origin/main plugins/testing/skills/audit/adapters/ (no cpp adapter); gh api orgs/melodic-software/repos (no C++ repository)
Next: nobody acts now. Pick it up when one of the triggers above appears.
This was generated by AI.
kyle-sexton commentedon Oct 19, 2026
This was generated by AI during triage.
Held: the owner decided on 2026-10-13 to hold the C++ adapter (with #6235, #6237, #6238) until a repository the owner works in uses C++ or an outside user asks.
kyle-sexton commentedon Oct 24, 2026
Decision recorded. Owner, Backlog HITL session, 2026-10-24. Q99: "Should the six issues parked until demand appears close as not planned, each with a reopen note?" Answer: "yes, go w/ recomended". To reopen: reopen this issue when a repo uses this or a user asks for it; the body and decisions above stay as the spec.