| Property | Value |
|---|---|
| Category | Constraints (JustDummies.Constraints) |
| Severity | 🔵 Info |
| Enabled by default | Yes |
The constraint is legal and inert: the domain it produces is the one that already existed.
This is the only member of the constraint family the run time never reports. Every other contradiction throws eventually and loudly; an inert constraint leaves the test green while it exercises a domain the author did not write.
The dangerous case is an exclusion of a sentinel the generator could never draw. It silently misses — and starts mattering the day someone widens the range, at which point the sentinel begins appearing and a distant test starts flaking.
Noncompliant
Any.Int32().Between(1, 10).Except(20) // JD024: 20 was never in [1, 10]
Any.Int32().Positive().GreaterThan(-5) // JD024: Positive() already requires ≥ 1
Compliant
Any.Int32().Between(1, 30).Except(20) // the exclusion now removes something
Any.Int32().Positive().GreaterThan(100) // the bound now narrows
Info rather than Warning
A defensive or documentary constraint is a real and reasonable style: a team writes .Except(0) on a range that already excludes 0 so the intent survives a future widening. The rule states the fact without insisting it is a defect.
What it does not flag
- An exclusion that removes at least one reachable value.
- A bound that genuinely narrows the domain.
- The same bound declared twice —
GreaterThanOrEqualTo(10).GreaterThanOrEqualTo(8). That is one phenomenon in both writing orders and in every generator family, so it has a rule of its own: JD032, at warning severity. This rule keeps a bound implied by a different one, which is the shape its examples above show. - Anything on a non-integer generator, or a chain with a non-constant argument.
- A
UInt64argument abovelong.MaxValue— the model reasons inlong, so the chain is left alone rather than judged on a truncated value.