Rule request
Description
Detect use of the @pytest.mark.xfail decorator and ensure it explicitly sets a strict=True or strict=False rather than allowing silent (and possibly accidental) use of the default False configuration.
Rationale
The pytest.mark.xfail decorator has a strict parameter that defaults to False, making xfail in CI roughly equivalent to a skip rather than failing if the test passes. This would prevent accidentally committing xfail tests that get hidden in CI.
Rule request
Description
Detect use of the
@pytest.mark.xfaildecorator and ensure it explicitly sets astrict=Trueorstrict=Falserather than allowing silent (and possibly accidental) use of the defaultFalseconfiguration.Rationale
The
pytest.mark.xfaildecorator has astrictparameter that defaults toFalse, makingxfailin CI roughly equivalent to askiprather than failing if the test passes. This would prevent accidentally committingxfailtests that get hidden in CI.