CheckTypeEmissionTest
class CheckTypeEmissionTest extends TestCase (View source)
Guards the join between known problems and the checks that consume them.
Known-problem suppression is keyed by CheckType: a check passes its CheckType to KnownProblemsRegistry (via getCheckName() or directly to skipWithKnownProblem()), and the registry matches it against the CheckType stored in each ProblemDefinition.
Since both sides are now the same enum, a misspelled name is a compile error and can no longer break the join silently. What remains possible — and still silent — is a provider referencing a CheckType that no check ever emits: the skip never fires and the entity is validated anyway, so the suppression looks configured but does nothing. That is what this test guards.
This is exactly how ENUM_CONSTANTS / INTERFACE_CONSTANTS / ENUM_FINAL etc. became latent traps: the constant/final checks were unified into entity-agnostic classes that always report the Class* name, leaving those enum/interface CheckType values unemittable. Those cases were removed; this test stops equivalent orphans from being reintroduced.
Methods
Every CheckType referenced by the default provider must be emitted by at least one check, otherwise the known-problem skip can never match.
Details
void
testEveryReferencedCheckTypeIsEmittedBySomeCheck()
Every CheckType referenced by the default provider must be emitted by at least one check, otherwise the known-problem skip can never match.