in tools/ci/paimon-ci-tools/src/main/java/org/apache/paimon/tools/ci/suffixcheck/ScalaSuffixChecker.java [63:90]
public static void main(String[] args) throws IOException {
if (args.length < 2) {
System.out.println("Usage: ScalaSuffixChecker <pathMavenBuildOutput> <pathPaimonRoot>");
System.exit(1);
}
final Path mavenOutputPath = Paths.get(args[0]);
final Path paimonRootPath = Paths.get(args[1]);
final ParseResult parseResult = parseMavenOutput(mavenOutputPath);
if (parseResult.getCleanModules().isEmpty()) {
LOG.error("Parsing found 0 scala-free modules; the parsing is likely broken.");
System.exit(1);
}
if (parseResult.getInfectedModules().isEmpty()) {
LOG.error("Parsing found 0 scala-dependent modules; the parsing is likely broken.");
System.exit(1);
}
final Collection<String> violations = checkScalaSuffixes(parseResult, paimonRootPath);
if (!violations.isEmpty()) {
LOG.error(
"Violations found:{}",
violations.stream().collect(Collectors.joining("\n\t", "\n\t", "")));
System.exit(1);
}
}