public class NamingConventionsCheck
extends java.lang.Object
Checks that all tests in a directory are named according to our naming conventions. This is important because tests that do not follow
our conventions aren't run by gradle. This was once a glorious unit test but now that Elasticsearch is a multi-module project it must be
a class with a main method so gradle can call it for each project. This has the advantage of allowing gradle to calculate when it is
UP-TO-DATE so it can be skipped if the compiled classes haven't changed. This is useful on large modules for which checking all
the modules can be slow.
Annoyingly, this cannot be tested using standard unit tests because to do so you'd have to declare classes that violate the rules. That
would cause the test fail which would prevent the build from passing. So we have to make a mechanism for removing those test classes. Now
that we have such a mechanism it isn't much work to fail the process if we don't detect the offending classes. Thus, the funky
--self-test that is only run in the test:framework project.