protected static void checkPattern(final String arg) throws IOException {
        var failBuild = new AtomicBoolean(false);
        Files.walk(Paths.get(arg))
            .filter(file -> Files.isRegularFile(file)
                && file.toFile().getPath().matches(".*\\.java")
                && !file.toFile().getPath().matches(".*Tests\\.java")
                && readFile(file).contains("@Async")
                && !readFile(file).contains("public interface"))
            .forEach(file -> {
                print("%s must have an interface that has Async annotation in interface", file);
                failBuild.set(true);
            });
        if (failBuild.get()) {
            System.exit(1);
        }
    }
This is {@link CheckAsyncAnnotationInInterface}.
Fail build if Async annotation is not in an interface.
This ensures interface exists for Async classes so Spring can use JDK proxy instead of cglib proxy.
@author Hal Deadman
@since 6.5.0
ci/checks/CheckAsyncAnnotationInInterface.java