In dealing with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/201086/ we realized how easy it is for someone to define a new variable for AbuseFilter but not create a pertinent unit test for it.
Rather than relying on coders to keep that in mind, it is ideal if we had a Jenkins task that would fail if there exists a variable that is not part of any unit tests.
@Legoktm suggested in the latest comment on that patch an approach:
Write a unit test that iterates over the list of variables and checks whether $this->assertTrue( file_exists( tests/parserTests/$variable ), "missing test for $variable" )? My pseudo-code is bad but you get the idea :)
However, since variables can also be added by other extensions (e.g. StructuredDiscussions currently adds some variables) this may not be a final solution and needs more thought.