protected static void checkPattern(final String arg) throws IOException {
        var failBuild = new AtomicBoolean(false);
        var pattern = Pattern.compile("(private|protected)\\s+final\\s(\\w+<*\\w*>*)\\s+(\\w+);");

        Files.walk(Paths.get(arg))
            .filter(file -> Files.isRegularFile(file)
                && file.toFile().getPath().matches(".*\\.java"))
            .forEach(file -> {
                var text = readFile(file);
                var matcher = pattern.matcher(text);
                while (matcher.find()) {
                    var type = matcher.group(2);
                    var variable = matcher.group(3);
                    checkForGetterSetter(failBuild, file, text, type, variable);
                }
            });

        if (failBuild.get()) {
            System.exit(1);
        }
    }
This is {@link CheckEnforceLombokAnnotations}.

@author Misagh Moayyed
@since 6.3.0
ci/checks/CheckEnforceLombokAnnotations.java