R85 Put a regression test only in the module where the bug was

Off by default

Put a regression test only with the tests of the module where the bug occurred.

Reason

A bug shows where it occurred, not that the same mistake lurks in every other module. Assertions that it is absent everywhere else add tests that each cost upkeep and guard against nothing seen (Art. III §4), and they tend to multiply after a correction, when the urge to show the mistake will never recur is strongest.

Verification

The module where the bug occurred is the one whose code the fix changes; its tests are where that module’s tests are kept. A regression test is as rule 84 defines it.

Violated when a change adds, for one bug, a regression test or an assertion that the bug or its cause is absent to the tests of a module where the bug did not occur.

Provisions of the constitution it cites

Relations

Parent
R277 Testing
Requires
R84 Write a regression test only for a bug that occurred
Conflicts with
none

Metadata

ID
85
Revision
3
Kind
rule
Status
trial
Slug
regression-test-where-the-bug-was
Default level
project
Constitution revisions
>=1
Check
none
Default
off
Uses
Instructions instructions, Review review
Original language
English en
Translations
Chinese zh