fleetlint Policy for a fleet of repositories
v0.10
Getting started

slop/skipped-tests

No skipped tests are committed

Severityinfo
Tiersall
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.7.0
Selected byfleetlint-slop@v0.7.0

Requirement

Tests are not skipped unconditionally (it.skip(, xit, @Ignore, @Disabled, [Fact(Skip = ...)], #[ignore], @pytest.mark.skip, skip: true) unless the same line references an issue: #123, ABC-123 or an issue URL. Conditional skips (t.Skip, skipif) are not read.

Why

A skipped test is coverage that the numbers still count and the suite no longer provides.

Check

For each item in:

codegrep("test", r'\b(it|describe|test|context|suite)\.skip\(|\bx(it|describe|context)[\s(]|@Ignore\b|\[Ignore[\](]|@Disabled\b|\bSkip\s*=\s*\x22|#\[ignore\]|@pytest\.mark\.skip(\(|\s*$)|@unittest\.skip\(|\bskip:\s*(true|[\x22\x27])')
item.text.matches(r'#\d+|\b[A-Z][A-Z0-9]+-\d+\b|https?://\S+/(issues?|browse|pull|merge_requests)/\S*\d')

Fix

Fix or delete the test; if it must be quarantined, reference the issue on the same line.

Agent instruction: Report each skipped test with its reason; do not un-skip tests that then fail without fixing the cause, and do not invent issue numbers.

Sources


Generated by fleetlint docs from catalog v0.7.0.