Checks by language

CheckJS/TSPythonGoC#F#VB.NETGherkin
A test mocks the code it testsFullLimited, see note 1Not supported, see note 4Limited, see note 9Not supported, see note 14Not supported, see note 21Not supported, see note 27
An assertion that can never failFullFullFullFullFullFullNot supported, see note 28
A test that checks nothingFullFullFullFullFullFullNot supported, see note 29
A test was skipped or turned offFullFullFullFullFullFullLimited, see note 30
A test or assertion was deletedFullFullFullLimited, see note 10Limited, see note 15Limited, see note 22Full
An exact check was made looserFullFullLimited, see note 5FullLimited, see note 16FullNot supported, see note 31
Many snapshots were updated at onceFullLimited, see note 2Not supported, see note 6Limited, see note 11Limited, see note 17Limited, see note 23Not supported, see note 32
The CI test gate was weakenedFullFullFullFullLimited, see note 18Limited, see note 24Not supported, see note 33
A test mocks almost everythingFullFullLimited, see note 7Limited, see note 12Not supported, see note 19Not supported, see note 25Not supported, see note 34
An async test checks nothing after it waitsFullLimited, see note 3Not supported, see note 8Limited, see note 13Not supported, see note 20Limited, see note 26Not supported, see note 35
Rule IDs and formal names
CheckRule IDFormal name
A test mocks the code it testsTG-001Circular / self-mock
An assertion that can never failTG-002Tautological assert
A test that checks nothingTG-003Empty test body
A test was skipped or turned offTG-004Skipped / disabled test (new or newly skipped)
A test or assertion was deletedTG-005Deleted tests / assertion deletion
An exact check was made looserTG-006Weakened matchers
Many snapshots were updated at onceTG-007Mass snapshot update
The CI test gate was weakenedTG-008CI disarm / gate bypass
A test mocks almost everythingTG-009Over-mock / mock-everything (soft → medium)
An async test checks nothing after it waitsTG-010No-assert async / dangling promise (low)

Limits by language

What each limited or not-supported check misses. Open a language to read its numbered notes; each numbered badge in the table opens its note.

JS/TS

No limits: every check works fully.

Python

3 limits
  1. A test mocks the code it tests (limited): patches in fixtures/conftest are not attributed to a test; SUT is matched by module name = test file stem.
  2. Many snapshots were updated at once (limited): syrupy .ambr files only.
  3. An async test checks nothing after it waits (limited): awaits with no assertion afterwards; unawaited coroutines are not detected.

Go

5 limits
  1. A test mocks the code it tests (not supported): needs type information to know what a test double stands in for.
  2. An exact check was made looser (limited): weak forms recognised only for testify (NotNil, NotEmpty, True on a bare identifier).
  3. Many snapshots were updated at once (not supported): no Go snapshot format recognised.
  4. A test mocks almost everything (limited): testify mock .On receivers only; hand-written fakes are not counted.
  5. An async test checks nothing after it waits (not supported): no async test model.

C#

5 limits, 5 syntax notes
  1. A test mocks the code it tests (limited): Moq, NSubstitute, FakeItEasy, Rhino Mocks, JustMock and AutoFixture mocks and hand-written fakes in the test file; the class under test comes from [TestSubject], a sut/_sut variable, parameter or field, or new X(...) in the test class or its [SetUp]/constructor; when none of these is found, both new X(...) in the test body and the test file name minus a Tests/Test suffix count; a partial mock or subclass fake of the type under test, held in a local variable, is reported when the test calls a member the mock sets up or the fake overrides.
  2. A test or assertion was deleted (limited): removed [InlineData], [InlineAutoData], [TestCase] and [DataRow] rows and entries of a MemberData/TestCaseSource member listed in the same file are counted; rows produced by loops or LINQ at run time, and ClassData/DynamicData sources in files the pull request does not change, are not counted.
  3. Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
  4. A test mocks almost everything (limited): Moq, NSubstitute, FakeItEasy, Rhino Mocks, JustMock and AutoFixture mocks, plus hand-written fakes (a class in the test file that implements an interface, or extends a type its name contains).
  5. An async test checks nothing after it waits (limited): async Task tests that await with no assertion afterwards, *Async(...) calls used as a bare statement or _ = discard, and async void tests; a Task stored in a variable is detected when its declared type is Task or ValueTask, or the call ends in Async, and the variable is never used again.

C# syntax TestGuard does not read

WhatHow TestGuard treats it
Helpers, base classes, partial classesCustom assertion helpers are followed one level; helpers, base test classes and partial class halves are followed across the changed files TestGuard reads as tests; ones in a file the pull request does not change are not seen. [Ignore] on a base class skips only that class's own tests, as NUnit and MSTest do; it does not skip a derived class's tests.
#if branches#if branches are evaluated only when every symbol is set by #define/#undef in the file or by a <DefineConstants> outside any Condition in the nearest .csproj the pull request changes; otherwise every branch is read as text.
Assert.Ignore / InconclusiveAssert.Ignore and Assert.Inconclusive inside an if, loop, lambda or other block are reported as a possible conditional skip, with low severity; the test still counts as active.
Source generatorsFiles marked auto-generated are skipped; tests that source generators create at build time are not seen.
New vs. classic readerThe C# notes on this page describe the newer reader, which builds a syntax tree of each file with the tree-sitter C# grammar. It is used for every C# pull request under about 5.7 MB of C# (counting the old and the new version of each edited file); a larger pull request is read by the classic reader, so the scan stays within its CPU time budget. The classic reader keeps the earlier limits: code inside interpolated-string { } holes is read as text, partial mocks and subclass fakes are not reported, rows from getter blocks, returned literals, DynamicData, ClassData and TestCaseSource(typeof(X)) are not counted, a Task stored in a variable is not detected, and tests a class inherits from a base class are read in the base class's own file only.

F#

7 limits, 6 syntax notes
  1. A test mocks the code it tests (not supported): mocks are not read in F# tests.
  2. A test or assertion was deleted (limited): [<InlineData>], [<TestCase>] and [<DataRow>] rows are counted; Expecto tests built by code (list comprehensions, functions) are not seen.
  3. An exact check was made looser (limited): Expecto Expect.*, FsUnit should, Assert and FluentAssertions calls; Expect.* arguments are split at spaces and parentheses, so an unparenthesised complex argument can be misread.
  4. Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
  5. The CI test gate was weakened (limited): workflow dotnet test and coverlet command lines only; .fsproj files are not read.
  6. A test mocks almost everything (not supported): mocks are not read in F# tests.
  7. An async test checks nothing after it waits (not supported): F# async and task computation expressions are not modelled.

F# syntax TestGuard does not read

WhatHow TestGuard treats it
Generated Expecto testsExpecto tests created by code (loops, list comprehensions, functions that call testCase) are not seen.
Focused Expecto testsFocused Expecto tests (ftestCase, ftest, ftestList) are read as normal tests; that they stop the other tests from running is not reported.
#if branches#if branches are not evaluated; every branch is read as text.
Custom assertion helpersCustom assertion helpers are followed one level, within the same file only.
IndentationA test body ends where its indentation ends; unusual offside layout can be misread.
Assert.Ignore in a blockAssert.Ignore inside an if or other block is not reported as a conditional skip.

VB.NET

6 limits, 5 syntax notes
  1. A test mocks the code it tests (not supported): mocks are not read in VB.NET tests.
  2. A test or assertion was deleted (limited): <InlineData>, <TestCase> and <DataRow> rows are counted; rows from MemberData, TestCaseSource or other code are not.
  3. Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
  4. The CI test gate was weakened (limited): workflow dotnet test and coverlet command lines only; .vbproj files are not read.
  5. A test mocks almost everything (not supported): mocks are not read in VB.NET tests.
  6. An async test checks nothing after it waits (limited): Async Function tests that await with no assertion afterwards, *Async(...) calls used as a bare statement and Async Sub tests; a Task stored in a variable and never awaited is not detected.

VB.NET syntax TestGuard does not read

WhatHow TestGuard treats it
Helpers and partial classesCustom assertion helpers are followed one level, within the same file only; base classes and Partial classes in other files are not read.
#If branches#If branches are not evaluated; every branch is read as text.
Assert.Ignore / InconclusiveAssert.Ignore and Assert.Inconclusive inside an If or other block are not reported as a conditional skip.
XML literalsXML literals are not read; code inside them can be misread.
NUnit [Is] constraintsNUnit constraints are read when written [Is] or Iz; other aliases are not.

Gherkin

9 limits, 5 syntax notes
  1. A test mocks the code it tests (not supported): feature files hold no mocks; step definitions are checked in their own language.
  2. An assertion that can never fail (not supported): feature files hold no assertions; step definitions are checked in their own language.
  3. A test that checks nothing (not supported): feature files hold no assertions; step definitions are checked in their own language.
  4. A test was skipped or turned off (limited): @ignore in any letter case on a Feature, Rule or scenario; an @ignore on an Examples block alone is not read.
  5. An exact check was made looser (not supported): feature files hold no assertions; step definitions are checked in their own language.
  6. Many snapshots were updated at once (not supported): snapshot files are counted whatever the test language; see the other .NET columns.
  7. The CI test gate was weakened (not supported): CI files are checked whatever the test language; see the other .NET columns.
  8. A test mocks almost everything (not supported): feature files hold no mocks; step definitions are checked in their own language.
  9. An async test checks nothing after it waits (not supported): feature files hold no async code.

Gherkin syntax TestGuard does not read

WhatHow TestGuard treats it
Localized keywordsOnly English Gherkin keywords are read; feature files in other languages (# language:) are not.
@ignore under Cucumber@ignore takes effect under SpecFlow and Reqnroll; plain Cucumber runs the scenario unless your tag filter excludes it, so TestGuard can report a scenario as skipped that Cucumber still runs.
@ignore on Examples@ignore on an Examples block alone is not read.
Renamed and edited scenariosA scenario renamed and edited in the same change is reported as removed.
Step definitionsStep definitions are checked as C#, F# or VB.NET test code only when their file matches a test path.