diff --git a/diff-java-tool/src/main/java/com/github/checkstyle/difftool/DiffTool.java b/diff-java-tool/src/main/java/com/github/checkstyle/difftool/DiffTool.java index a4a78a3ff..28f2ff0a1 100644 --- a/diff-java-tool/src/main/java/com/github/checkstyle/difftool/DiffTool.java +++ b/diff-java-tool/src/main/java/com/github/checkstyle/difftool/DiffTool.java @@ -62,6 +62,7 @@ import org.apache.commons.cli.ParseException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.yaml.snakeyaml.Yaml; /** * Main class for the DiffTool application. @@ -158,6 +159,46 @@ public static void main(final String[] args) throws Exception { } } + /** + * Parses the YAML file containing the list of projects. + * + * @param filePath The path to the YAML file. + * @return A list of Project instances parsed from the YAML file. + * @throws IOException If an I/O error occurs while reading the file. + */ + private static List parseProjectsFromYaml(final String filePath) throws IOException { + final Yaml yaml = new Yaml(); + try (InputStream inputStream = Files.newInputStream(Paths.get(filePath))) { + final Map yamlData = yaml.load(inputStream); + @SuppressWarnings("unchecked") + final List> projectsData = + (List>) yamlData.get("projects"); + final List projects = new ArrayList<>(); + for (final Map projectData : projectsData) { + final Project project = convertYamlProjectToProject(projectData); + projects.add(project); + } + return projects; + } + } + + /** + * Converts a YAML project data map into a Project instance. + * + * @param projectData The map containing project data from YAML. + * @return A Project instance populated with the data. + */ + @SuppressWarnings("unchecked") + private static Project convertYamlProjectToProject(final Map projectData) { + final Project project = new Project(); + project.setName((String) projectData.get("name")); + project.setScm((String) projectData.get("scm")); + project.setUrl((String) projectData.get("url")); + project.setReference((String) projectData.getOrDefault("reference", "")); + project.setExcludes((List) projectData.getOrDefault("excludes", new ArrayList<>())); + return project; + } + /** * Parses command line arguments and returns a CommandLine object. * @@ -268,6 +309,11 @@ private static boolean areValidCliOptions(final CommandLine cliOptions) { LOGGER.error("Error: file " + listOfProjectsFile.getName() + " does not exist!"); return false; } + if (!listOfProjectsFile.getName().endsWith(".yml") + && !listOfProjectsFile.getName().endsWith(".yaml")) { + LOGGER.error("Error: file " + listOfProjectsFile.getName() + " is not a YAML file!"); + return false; + } if (diffToolJarPath == null || diffToolJarPath.isEmpty()) { LOGGER.error("Error: diffToolJarPath is required!"); return false; @@ -534,9 +580,10 @@ private static CheckstyleReportInfo launchCheckstyleReport(final Map cfg) - throws InterruptedException { + throws InterruptedException, IOException { LOGGER.info("Testing Checkstyle started"); final String targetDir = "target"; @@ -544,12 +591,6 @@ private static void generateCheckstyleReport(final Map cfg) final String reposDir = "repositories"; final String reportsDir = "reports"; makeWorkDirsIfNotExist(srcDir, reposDir, reportsDir); - final int repoNameParamNo = 0; - final int repoTypeParamNo = 1; - final int repoUrlParamNo = 2; - final int repoCommitIdParamNo = 3; - final int repoExcludesParamNo = 4; - final int fullParamListSize = 5; final String checkstyleConfig = (String) cfg.get("checkstyleCfg"); final String checkstyleVersion = (String) cfg.get("checkstyleVersion"); @@ -558,77 +599,46 @@ private static void generateCheckstyleReport(final Map cfg) final String listOfProjects = (String) cfg.get("listOfProjects"); final String extraMvnRegressionOptions = (String) cfg.get("extraMvnRegressionOptions"); - try { - final List projects = Files.readAllLines(Paths.get(listOfProjects)); - for (final String project : projects) { - if (!project.startsWith("#") && !project.isEmpty()) { - final String[] params = project.split("\\|", -1); - if (params.length < fullParamListSize) { - throw new IllegalArgumentException("Error: line '" - + project - + "' in file '" - + listOfProjects - + "' should have " - + fullParamListSize - + " pipe-delimited sections!"); - } - - final String repoName = params[repoNameParamNo]; - final String repoType = params[repoTypeParamNo]; - final String repoUrl = params[repoUrlParamNo]; - final String commitId = params[repoCommitIdParamNo]; + final List projects = parseProjectsFromYaml(listOfProjects); + for (final Project project : projects) { + final String repoName = project.getName(); + final String repoType = project.getScm(); + final String repoUrl = project.getUrl(); + final String commitId = project.getReference(); - String excludes = ""; - if (allowExcludes) { - excludes = params[repoExcludesParamNo]; - } + String excludes = ""; + if (allowExcludes && project.getExcludes() != null) { + excludes = String.join(",", project.getExcludes()); + } - deleteDir(srcDir); - if ("local".equals(repoType)) { - copyDir(repoUrl, getOsSpecificPath(srcDir, repoName)); - } - else { - if (useShallowClone && !isGitSha(commitId)) { - shallowCloneRepository(repoName, - repoType, - repoUrl, - commitId, - reposDir); - } - else { - cloneRepository(repoName, - repoType, - repoUrl, - commitId, - reposDir); - } - copyDir(getOsSpecificPath(reposDir, repoName), - getOsSpecificPath(srcDir, repoName)); - } - runMavenExecution(srcDir, - excludes, - checkstyleConfig, - checkstyleVersion, - extraMvnRegressionOptions); - String repoPath = repoUrl; - if (!"local".equals(repoType)) { - repoPath = - new File(getOsSpecificPath(reposDir, repoName)).getAbsolutePath(); - } - postProcessCheckstyleReport(targetDir, repoName, repoPath); - deleteDir(getOsSpecificPath(srcDir, repoName)); - moveDir(targetDir, getOsSpecificPath(reportsDir, repoName)); + deleteDir(srcDir); + if ("local".equals(repoType)) { + copyDir(repoUrl, getOsSpecificPath(srcDir, repoName)); + } + else { + if (useShallowClone && !isGitSha(commitId)) { + shallowCloneRepository(repoName, repoType, repoUrl, commitId, reposDir); } + else { + cloneRepository(repoName, repoType, repoUrl, commitId, reposDir); + } + copyDir(getOsSpecificPath(reposDir, repoName), getOsSpecificPath(srcDir, repoName)); } - - // Restore empty_file to make src directory tracked by git - final File emptyFile = new File(getOsSpecificPath(srcDir, "empty_file")); - if (!emptyFile.createNewFile()) { - LOGGER.warn("Failed to create or already existing 'empty_file' in " + srcDir); + runMavenExecution(srcDir, excludes, checkstyleConfig, + checkstyleVersion, extraMvnRegressionOptions); + String repoPath = repoUrl; + if (!"local".equals(repoType)) { + repoPath = new File(getOsSpecificPath(reposDir, repoName)).getAbsolutePath(); } + postProcessCheckstyleReport(targetDir, repoName, repoPath); + deleteDir(getOsSpecificPath(srcDir, repoName)); + moveDir(targetDir, getOsSpecificPath(reportsDir, repoName)); } - catch (IOException ex) { - LOGGER.error("Error processing projects: " + ex.getMessage()); + + // Restore empty_file to make src directory tracked by git + final File emptyFile = new File(getOsSpecificPath(srcDir, "empty_file")); + if (!emptyFile.createNewFile()) { + LOGGER.warn("Failed to create or already existing 'empty_file' in " + srcDir); } } @@ -2384,5 +2394,120 @@ public CommandExecutionException(final String message, final int exitCode) { super(message + " (Exit code: " + exitCode + ")"); } } + + /** + * Represents a project with its SCM details and optional excludes. + */ + public static class Project { + /** The name of the project. */ + private String name; + + /** The SCM type (e.g., git). */ + private String scm; + + /** The repository URL. */ + private String url; + + /** The branch or commit reference. */ + private String reference; + + /** The list of excludes patterns. */ + private List excludes = new ArrayList<>(); + + /** + * Gets the project name. + * + * @return the name of the project. + */ + public String getName() { + return name; + } + + /** + * Sets the project name. + * + * @param name the name to set. + */ + public void setName(final String name) { + this.name = name; + } + + /** + * Gets the SCM type (e.g., git). + * + * @return the SCM type. + */ + public String getScm() { + return scm; + } + + /** + * Sets the SCM type. + * + * @param scm the SCM type to set. + */ + public void setScm(final String scm) { + this.scm = scm; + } + + /** + * Gets the repository URL. + * + * @return the repository URL. + */ + public String getUrl() { + return url; + } + + /** + * Sets the repository URL. + * + * @param url the URL to set. + */ + public void setUrl(final String url) { + this.url = url; + } + + /** + * Gets the branch or commit reference. + * + * @return the reference. + */ + public String getReference() { + return reference; + } + + /** + * Sets the branch or commit reference. + * + * @param reference the reference to set. + */ + public void setReference(final String reference) { + this.reference = reference; + } + + /** + * Gets the list of exclude patterns. + * + * @return a new list containing the exclude patterns. + */ + public List getExcludes() { + return new ArrayList<>(this.excludes); + } + + /** + * Sets the list of exclude patterns. + * + * @param excludes the list of excludes to set. + */ + public void setExcludes(final List excludes) { + if (excludes != null) { + this.excludes = new ArrayList<>(excludes); + } + else { + this.excludes.clear(); + } + } + } } diff --git a/extractor/src/main/java/com/example/extractor/CheckstyleExampleExtractor.java b/extractor/src/main/java/com/example/extractor/CheckstyleExampleExtractor.java index 00fc207b5..d5c2f307d 100644 --- a/extractor/src/main/java/com/example/extractor/CheckstyleExampleExtractor.java +++ b/extractor/src/main/java/com/example/extractor/CheckstyleExampleExtractor.java @@ -58,11 +58,18 @@ public final class CheckstyleExampleExtractor { private static final Path PROJECT_ROOT = Paths.get("").toAbsolutePath().getParent(); /** The filename for project properties. */ - private static final String PROJECT_PROPERTIES_FILENAME = "list-of-projects.properties"; + private static final String PROJ_PROP_PROP_FILENAME = "list-of-projects.properties"; + + /** The filename for project yml. */ + private static final String PROJ_YML_PROP_FILENAME = "list-of-projects.yml"; /** The file path for project properties. */ - private static final String PROJECT_PROPERTIES_FILE_PATH = - "src/main/resources/" + PROJECT_PROPERTIES_FILENAME; + private static final String PROJ_PROP_PROP_FILE_PATH = + "src/main/resources/" + PROJ_PROP_PROP_FILENAME; + + /** The file path for project yml. */ + private static final String PROJ_YML_PROP_FILE_PATH = + "src/main/resources/" + PROJ_YML_PROP_FILENAME; /** The regular expression pattern for excluded file paths. */ private static final String EXCLUDED_FILE_PATTERN = @@ -462,9 +469,22 @@ private static void writeConfigFile( * @throws IOException If an I/O error occurs. */ private static void copyPropertiesFile(final Path outputPath) throws IOException { - final Path sourcePropertiesPath = Paths.get(PROJECT_PROPERTIES_FILE_PATH).toAbsolutePath(); - final Path targetPropertiesPath = outputPath.resolve(PROJECT_PROPERTIES_FILENAME); - Files.copy(sourcePropertiesPath, targetPropertiesPath, StandardCopyOption.REPLACE_EXISTING); + final Path sourceYamlPath = + Paths.get(PROJ_YML_PROP_FILE_PATH).toAbsolutePath(); + final Path sourcePropertiesPath = + Paths.get(PROJ_PROP_PROP_FILE_PATH).toAbsolutePath(); + + if (Files.exists(sourceYamlPath)) { + final Path targetYamlPath = outputPath.resolve("list-of-projects.yml"); + Files.copy(sourceYamlPath, targetYamlPath, StandardCopyOption.REPLACE_EXISTING); + } + + if (Files.exists(sourcePropertiesPath)) { + final Path targetPropertiesPath = outputPath.resolve("list-of-projects.properties"); + Files.copy(sourcePropertiesPath, + targetPropertiesPath, + StandardCopyOption.REPLACE_EXISTING); + } } /** @@ -583,7 +603,9 @@ private static void handleAllExamplesInOne( ); } else { + // Copy default properties and YAML files copyDefaultPropertiesFile(allInOneSubfolderPath); + copyDefaultYamlFile(allInOneSubfolderPath); } } catch (IOException ex) { @@ -591,6 +613,7 @@ private static void handleAllExamplesInOne( "Error processing YAML file for all-examples-in-one: " + ex.getMessage(), ex); copyDefaultPropertiesFile(allInOneSubfolderPath); + copyDefaultYamlFile(allInOneSubfolderPath); } } @@ -605,7 +628,7 @@ private static void copyDefaultPropertiesFile(final Path allInOneSubfolderPath) .get(YamlParserAndProjectHandler.DEFAULT_PROJECTS_PATH) .toAbsolutePath(); final Path targetPropertiesPath = - allInOneSubfolderPath.resolve(PROJECT_PROPERTIES_FILENAME); + allInOneSubfolderPath.resolve(PROJ_PROP_PROP_FILENAME); Files.copy(sourcePropertiesPath, targetPropertiesPath, StandardCopyOption.REPLACE_EXISTING); @@ -615,6 +638,25 @@ private static void copyDefaultPropertiesFile(final Path allInOneSubfolderPath) } } + /** + * Copies the default YAML file to the specified subfolder path. + * + * @param allInOneSubfolderPath the target directory to copy the YAML file into. + */ + private static void copyDefaultYamlFile(final Path allInOneSubfolderPath) { + try { + final Path sourceYamlPath = Paths + .get("src/main/resources/list-of-projects.yml") + .toAbsolutePath(); + final Path targetYamlPath = allInOneSubfolderPath.resolve("list-of-projects.yml"); + Files.copy(sourceYamlPath, targetYamlPath, StandardCopyOption.REPLACE_EXISTING); + } + catch (IOException ex) { + LOGGER.log(Level.SEVERE, + "Error copying default YAML file", ex); + } + } + /** * Generates a README file for the "all-examples-in-one" case. * diff --git a/extractor/src/main/java/com/example/extractor/YamlParserAndProjectHandler.java b/extractor/src/main/java/com/example/extractor/YamlParserAndProjectHandler.java index aaa1ea78b..623b796a0 100644 --- a/extractor/src/main/java/com/example/extractor/YamlParserAndProjectHandler.java +++ b/extractor/src/main/java/com/example/extractor/YamlParserAndProjectHandler.java @@ -21,12 +21,15 @@ import java.io.IOException; import java.io.InputStream; +import java.io.Writer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.yaml.snakeyaml.Yaml; @@ -54,6 +57,16 @@ public final class YamlParserAndProjectHandler { + "# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]\n" + "# Please note that bash comments work in this file\n\n"; + /** + * The Constant REFERENCE_INDEX. + */ + private static final int REFERENCE_INDEX = 3; + + /** + * The Constant EXCLUDES_INDEX. + */ + private static final int EXCLUDES_INDEX = 4; + /** * Path to the YAML file containing project configurations. */ @@ -122,25 +135,90 @@ static Map parseYamlFile() throws IOException { * @param allProjectLines the list of all project lines * @param checkName the name of the check * @throws IOException if an I/O error occurs + * @throws IllegalArgumentException if a project name is not found in all-projects.properties */ static void createProjectsFileForExample(final Path examplePath, final List projectNames, final List allProjectLines, final String checkName) throws IOException { Files.createDirectories(examplePath); - final Path projectsFilePath = examplePath.resolve("list-of-projects.properties"); + final Path projectsFilePath = examplePath.resolve("list-of-projects.yml"); - final List fileContents = new ArrayList<>(); - fileContents.add(DEFAULT_COMMENTS); + final List> projects; if (projectNames != null && !projectNames.isEmpty()) { - addProjectInfos(projectNames, allProjectLines, fileContents, checkName); + // **Custom Projects Specified**: Generate a custom list-of-projects.yml + projects = new ArrayList<>(); + for (final String projectName : projectNames) { + final String projectInfo = findProjectInfo(projectName, allProjectLines); + if (projectInfo != null) { + final Map projectData = parseProjectInfo(projectInfo); + projects.add(projectData); + } + else { + throw new IllegalArgumentException( + "Project not found in all-projects.properties: " + + projectName + + " (Context: " + + checkName + + ")"); + } + } } else { - fileContents.addAll(Files.readAllLines(Paths.get(DEFAULT_PROJECTS_PATH))); + // **No Custom Projects**: Use the default project list + projects = parseAllProjects(allProjectLines); } - Files.write(projectsFilePath, fileContents); + final Map yamlData = new ConcurrentHashMap<>(); + yamlData.put("projects", projects); + + final Yaml yaml = new Yaml(); + try (Writer writer = Files.newBufferedWriter(projectsFilePath)) { + yaml.dump(yamlData, writer); + } + } + + /** + * Parses a pipe-delimited project info string into a map with keys: + * name, scm, url, reference, and excludes. + * + * @param projectInfo the pipe-delimited project info string. + * @return a map of project details. + */ + private static Map parseProjectInfo(final String projectInfo) { + final String[] parts = projectInfo.split("\\|", 5); + final Map projectData = new ConcurrentHashMap<>(); + projectData.put("name", parts[0]); + projectData.put("scm", parts[1]); + projectData.put("url", parts[2]); + if (parts.length > REFERENCE_INDEX) { + projectData.put("reference", parts[REFERENCE_INDEX]); + } + + if (parts.length > EXCLUDES_INDEX) { + projectData.put("excludes", Arrays.asList(parts[EXCLUDES_INDEX].split(","))); + } + return projectData; + } + + /** + * Parses a list of project lines, excluding empty and commented lines, + * and converts them into a list of project data maps. + * + * @param allProjectLines the list of project lines to parse + * @return a list of maps containing project information + */ + private static List> parseAllProjects(final List allProjectLines) { + final List> projects = new ArrayList<>(); + for (final String line : allProjectLines) { + final String trimmedLine = line.trim(); + if (!trimmedLine.isEmpty() && !trimmedLine.startsWith("#")) { + final Map projectData = parseProjectInfo(trimmedLine); + projects.add(projectData); + } + } + return projects; } /** diff --git a/extractor/src/main/resources/list-of-projects.yml b/extractor/src/main/resources/list-of-projects.yml new file mode 100644 index 000000000..f1a0da411 --- /dev/null +++ b/extractor/src/main/resources/list-of-projects.yml @@ -0,0 +1,367 @@ +projects: + # Few projects that deliver a set of unusual Java constructions that shall be correctly handled by AST visitor + - name: checkstyle + scm: git + url: https://github.com/checkstyle/checkstyle.git + reference: master + excludes: + - '**/.ci-temp/**/*' + - '**/resources-noncompilable/**/asttreestringprinter/**/*' + - '**/resources-noncompilable/**/filefilters/**/*' + - '**/resources-noncompilable/**/main/**/*' + - '**/resources-noncompilable/**/suppressionsstringprinter/**/*' + - '**/resources-noncompilable/**/gui/**/*' + - '**/resources-noncompilable/**/javadocpropertiesgenerator/**/*' + - 'src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/javaparser/InputJavaParser.java' + - '**/InputAllEscapedUnicodeCharacters.java' # 'InputAllEscapedUnicodeCharacters' must be skipped because it is too big and slows down JXR + - '**/resources-noncompilable/**/javaparser/InputJavaParser.java' + - '**/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java' + - '**/resources-noncompilable/**/grammar/java19/*' + - '**/resources-noncompilable/**/treewalker/**/*' + + - name: sevntu-checkstyle + scm: git + url: https://github.com/sevntu-checkstyle/sevntu.checkstyle + reference: master + + - name: checkstyle-sonar + scm: git + url: https://github.com/checkstyle/sonar-checkstyle + reference: master + + # OpenJDK 21 requires lots of excludes; list here should be consistent with file filters at: + # https://github.com/checkstyle/checkstyle/blob/master/config/projects-to-test/openjdk21-excluded.files + - name: openjdk21 + scm: git + url: https://github.com/openjdk/jdk21.git + reference: master + excludes: + - '**/test/langtools/jdk/javadoc/doclet/testSupplementary/C.java' + - '**/test/hotspot/jtreg/runtime/exceptionMsgs/methodPrinting/TestPrintingMethods.java' + - '**/test/langtools/tools/javac/MethodParameters/UncommonParamNames.java' + - '**/test/langtools/tools/javac/unicode/UnicodeAtEOL.java' + - '**/test/langtools/tools/javac/unicode/UnicodeCommentDelimiter.java' + - '**/test/langtools/tools/javac/unicode/FirstChar2.java' + - '**/test/langtools/tools/javac/diags/examples/UnnamedClass.java' + - '**/test/jdk/java/lang/Class/UnnamedClass/Unnamed.java' + - '**/test/langtools/tools/javac/unnamedclass/SourceLevelErrorPosition.java' + - '**/test/langtools/tools/javac/processing/model/element/Anonymous.java' + - '**/test/langtools/tools/javac/unnamedclass/NestedEnum.java' + - '**/test/jdk/java/lang/template/StringTemplateTest.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplate.java' + - '**/test/micro/org/openjdk/bench/java/lang/StringTemplateFMT.java' + - '**/test/jdk/java/lang/template/Basic.java' + - '**/test/jdk/java/lang/template/FormatterBuilder.java' + - '**/test/langtools/tools/javac/template/T8312814.java' + - '**/test/langtools/tools/javac/TextBlockIllegalEscape.java' + - '**/test/langtools/tools/javac/diags/examples/UnnamedClassNoMain.java' + - '**/test/langtools/tools/javac/diags/examples/UnnamedClassBad-Filename.java' + - '**/test/langtools/tools/javac/unnamed/UnnamedClassRecovery.java' + - '**/test/langtools/tools/javac/patterns/UnnamedErrors.java' + - '**/test/langtools/tools/javac/diags/examples/UnnamedClassHasPackage.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedString.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplateUnclosedTextBlock.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplateNoProcessor.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplateRawProcessor.java' + - '**/test/langtools/tools/javac/diags/examples/StringTemplateNotProcessor.java' + - '**/test/langtools/tools/javac/diags/examples/ModuleDeclSbInModuleInfoJava.java' + - '**/test/langtools/jdk/javadoc/tool/T4994049/FileWithTabs.java' + - '**/test/langtools/jdk/javadoc/tool/6964914/Error.java' + - '**/test/langtools/jdk/javadoc/doclet/testUnnamedPackage/src1/BadSource.java' + - '**/test/langtools/jdk/javadoc/doclet/testSourceTab/SingleTab/C.java' + - '**/test/langtools/jdk/javadoc/doclet/testSourceTab/DoubleTab/C.java' + - '**/test/langtools/tools/javac/enum/EnumAsIdentifier.java' + - '**/test/langtools/tools/javac/enum/EnumMembersOrder.java' + - '**/test/langtools/tools/javac/T6882235.java' + - '**/test/langtools/tools/javac/6440583/A.java' + - '**/test/langtools/tools/javac/T4994049/T4994049.java' + - '**/test/langtools/tools/javac/T8185983/RejectTypeArgsOnSelectTest.java' + - '**/test/langtools/tools/javac/T8286057.java' + - '**/test/langtools/tools/javac/rawDiags/Error.java' + - '**/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java' + - '**/test/langtools/tools/javac/lambda/lambdaExpression/InvalidExpression1.java' + - '**/test/langtools/tools/javac/lambda/8131742/T8131742.java' + - '**/test/langtools/tools/javac/lambda/funcInterfaces/LambdaTest1_neg1.java' + - '**/test/langtools/tools/javac/processing/6994946/SyntaxErrorTest.java' + - '**/test/langtools/tools/javac/processing/errors/TestParseErrors/ParseErrors.java' + - '**/test/langtools/tools/javac/IllegalAnnotation.java' + - '**/test/langtools/tools/javac/ExtendArray.java' + - '**/test/langtools/tools/javac/unicode/TripleQuote.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID4.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID3.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID2.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID5.java' + - '**/test/langtools/tools/javac/unicode/NonasciiDigit.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID1.java' + - '**/test/langtools/tools/javac/unicode/SupplementaryJavaID6.java' + - '**/test/langtools/tools/javac/patterns/DeconstructionPatternErrors.java' + - '**/test/langtools/tools/javac/patterns/ForEachPatternsErrors.java' + - '**/test/langtools/tools/javac/patterns/PatternCaseErrorRecovery.java' + - '**/test/langtools/tools/javac/Digits.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/IndexArray.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/IncompleteArray.java' + - '**/test/langtools/tools/javac/patterns/ForEachTestAllAnalyzers.java' + - '**/test/langtools/tools/javac/patterns/NoModifiersOnBinding.java' + - '**/test/langtools/tools/javac/patterns/SwitchErrors.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/DotClass.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/StaticFields.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/BadCast.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedPackage2.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedClassExpr.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedImport.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedMethodSelectorTest.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/failures/OldArray.java' + - '**/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.java' + - '**/test/langtools/tools/javac/annotations/neg/Z5.java' + - '**/test/langtools/tools/javac/annotations/neg/AnnComma.java' + - '**/test/langtools/tools/javac/annotations/neg/Z9.java' + - '**/test/langtools/tools/javac/annotations/neg/Z2.java' + - '**/test/langtools/tools/javac/annotations/neg/NoDefault.java' + - '**/test/langtools/tools/javac/annotations/neg/Z8.java' + - '**/test/langtools/tools/javac/annotations/neg/NoStatic.java' + - '**/test/langtools/tools/javac/annotations/neg/Z3.java' + - '**/test/langtools/tools/javac/annotations/neg/Z13.java' + - '**/test/langtools/tools/javac/annotations/neg/pkg/package-info.java' + - '**/test/langtools/tools/javac/annotations/neg/Z14.java' + - '**/test/langtools/tools/javac/annotations/neg/Syntax1.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalStartOfStmt.java' + - '**/test/langtools/tools/javac/diags/examples/UnclosedStringLiteral.java' + - '**/test/langtools/tools/javac/diags/examples/Expected3.java' + - '**/test/langtools/tools/javac/diags/examples/VarAllOrNothing.java' + - '**/test/langtools/tools/javac/diags/examples/ForeachNotExhaustive.java' + - '**/test/langtools/tools/javac/diags/examples/DefaultAllowedInIntfAnnotationMember.java' + - '**/test/langtools/tools/javac/diags/examples/ForeachBadInitialization.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalArrayCreation.java' + - '**/test/langtools/tools/javac/diags/examples/ExpectedModule.java' + - '**/test/langtools/tools/javac/diags/examples/TryWithResourcesExprNeedsVar.java' + - '**/test/langtools/tools/javac/diags/examples/InitializerNotAllowed.java' + - '**/test/langtools/tools/javac/diags/examples/MalformedFpLit.java' + - '**/test/langtools/tools/javac/diags/examples/TextBlockCloseDelimiter.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalNonAsciiDigit.java' + - '**/test/langtools/tools/javac/diags/examples/CatchWithoutTry.java' + - '**/test/langtools/tools/javac/diags/examples/ProcessorWrongType/ProcessorWrongType.java' + - '**/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java' + - '**/test/langtools/tools/javac/diags/examples/InvalidHexNumber.java' + - '**/test/langtools/tools/javac/diags/examples/EmptyCharLiteral.java' + - '**/test/langtools/tools/javac/diags/examples/EnumsCantBeGeneric.java' + - '**/test/langtools/tools/javac/diags/examples/RecordsCantDeclareComponentModifiers.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalChar.java' + - '**/test/langtools/tools/javac/diags/examples/NotAllowedClass.java' + - '**/test/langtools/tools/javac/diags/examples/ArrayDimMissing.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalAnnotationDeclaration.java' + - '**/test/langtools/tools/javac/diags/examples/EnumAsIdentifier2.java' + - '**/test/langtools/tools/javac/diags/examples/ThisAsIdentifier.java' + - '**/test/langtools/tools/javac/diags/examples/VarargsMustBeLast.java' + - '**/test/langtools/tools/javac/diags/examples/CantExtendIntfAnno.java' + - '**/test/langtools/tools/javac/diags/examples/RecordsComponentsCanNotDeclareCStyleArrays.java' + - '**/test/langtools/tools/javac/diags/examples/AnnotationMustBeNameValue.java' + - '**/test/langtools/tools/javac/diags/examples/NotAllowedVariable.java' + - '**/test/langtools/tools/javac/diags/examples/VarargsAndReceiver.java' + - '**/test/langtools/tools/javac/diags/examples/Orphaned.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalEscapeChar.java' + - '**/test/langtools/tools/javac/diags/examples/UnclosedComment.java' + - '**/test/langtools/tools/javac/diags/examples/IntNumberTooLarge.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalUnderscore.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalDot.java' + - '**/test/langtools/tools/javac/diags/examples/PrematureEOF.java' + - '**/test/langtools/tools/javac/diags/examples/AssertAsIdentifier2.java' + - '**/test/langtools/tools/javac/diags/examples/UnclosedCharLiteral.java' + - '**/test/langtools/tools/javac/diags/examples/TryWithoutCatchOrFinallyOrResource.java' + - '**/test/langtools/tools/javac/diags/examples/CannotCreateArrayWithTypeArgs.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalLineEndInCharLit.java' + - '**/test/langtools/tools/javac/diags/examples/ExplicitImplicitLambda.java' + - '**/test/langtools/tools/javac/diags/examples/EnumConstantExpected.java' + - '**/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java' + - '**/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalStartOfExpr.java' + - '**/test/langtools/tools/javac/diags/examples/IllegalStartOfType.java' + - '**/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveParams.java' + - '**/test/langtools/tools/javac/DefiniteAssignment/ConstantInfiniteWhile.java' + - '**/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java' + - '**/test/langtools/tools/javac/diags/examples/DotClassExpected.java' + - '**/test/langtools/tools/javac/diags/examples/ElseWithoutIf.java' + - '**/test/langtools/tools/javac/diags/examples/IdentifierExpected.java' + - '**/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveTypeParams.java' + - '**/test/langtools/tools/javac/diags/examples/FinallyWithoutTry.java' + - '**/test/langtools/tools/javac/diags/examples/IncorrectRecordDeclaration.java' + - '**/test/langtools/tools/javac/diags/examples/EnumConstantNotExpected.java' + - '**/test/langtools/tools/javac/diags/examples/CallMustBeFirst.java' + - '**/test/langtools/tools/javac/diags/examples/AnnotationMissingElementValue.java' + - '**/test/langtools/tools/javac/diags/examples/ThrowsNotAllowedInAnno.java' + - '**/test/langtools/tools/javac/diags/examples/Expected2.java' + - '**/test/langtools/tools/javac/diags/examples/IntfAnnotationCantHaveTypeParams.java' + - '**/test/langtools/tools/javac/EOI.java' + - '**/test/langtools/tools/javac/quid/T6999438.java' + - '**/test/langtools/tools/javac/T8036019.java' + - '**/test/langtools/tools/javac/Parens3.java' + - '**/test/langtools/tools/javac/records/RecordDeclarationSyntaxTest.java' + - '**/test/langtools/tools/javac/QualifiedAccess/QualifiedAccess_4.java' + - '**/test/langtools/tools/javac/policy/test3/A.java' + - '**/test/langtools/tools/javac/BadHexConstant.java' + - '**/test/langtools/tools/javac/failover/FailOver01.java' + - '**/test/langtools/tools/javac/failover/FailOver15.java' + - '**/test/langtools/tools/javac/generics/6413682/T6413682.java' + - '**/test/langtools/tools/javac/api/TestGetElementReferenceDataWithErrors.java' + - '**/test/langtools/tools/javac/api/T6265137a.java' + - '**/test/langtools/tools/javac/TryWithResources/PlainTry.java' + - '**/test/langtools/tools/javac/TryWithResources/ResDeclOutsideTry.java' + - '**/test/langtools/tools/javac/TryWithResources/TwrForVariable2.java' + - '**/test/langtools/tools/javac/TryWithResources/BadTwrSyntax.java' + - '**/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java' + - '**/test/langtools/tools/javac/ImportUnnamed/foo/A.java' + - '**/test/langtools/tools/javac/T8175198/AnnotationsAndFormalParamsTest.java' + - '**/test/langtools/tools/javac/parser/MissingClosingBrace.java' + - '**/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.java' + - '**/test/langtools/tools/javac/parser/7157165/T7157165.java' + - '**/test/langtools/tools/javac/parser/8081769/T8081769.java' + - '**/test/langtools/tools/javac/literals/BadBinaryLiterals.java' + - '**/test/langtools/tools/javac/literals/T6891079.java' + - '**/test/langtools/tools/javac/literals/BadUnderscoreLiterals.java' + - '**/test/langtools/tools/javac/incompleteStatements/T8000484.java' + - '**/test/hotspot/jtreg/runtime/classFileParserBug/Bad_NCDFE_Msg.java' + - '**/test/langtools/tools/javac/8245153/T8245153.java' + - '**/test/langtools/tools/javac/ExtraneousEquals.java' + - '**/test/langtools/tools/javac/parser/ErroneousParameters.java' + - '**/test/langtools/tools/javac/parser/T4881269.java' + - '**/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java' + - '**/test/langtools/tools/javac/switchextra/SwitchStatementBroken2.java' + - '**/test/langtools/tools/javac/BadAnnotation.java' + - '**/test/langtools/tools/javac/UncaughtOverflow.java' + - '**/test/langtools/tools/javac/LabeledDeclaration.java' + - '**/test/jdk/java/lang/template/T8313809.java' + - '**/test/langtools/tools/javac/T8312163.java' + - '**/test/langtools/tools/javac/patterns/PatternErrorRecovery.java' + - '**/test/langtools/tools/javac/patterns/T8309054.java' + - '**/test/langtools/tools/javac/diags/examples/GuardNotAllowed.java' + + - name: Hartshorn + scm: git + url: https://github.com/Dockbox-OSS/Hartshorn + reference: develop/0.7.0 + + - name: camunda + scm: git + url: https://github.com/camunda/camunda + reference: main + + - name: guava + scm: git + url: https://github.com/google/guava + reference: v28.2 + + - name: spotbugs + scm: git + url: https://github.com/spotbugs/spotbugs + reference: 3.1.2 + + - name: pmd + scm: git + url: https://github.com/pmd/pmd + reference: pmd_releases/6.21.0 + excludes: + - '**/pmd/pmd-java/src/test/**/*' + - '**/pmd/cpd/files/*' + + - name: spoon + scm: git + url: https://github.com/INRIA/spoon.git + reference: spoon-core-10.1.0 + excludes: + - '**/src/test/resources/**/*' + + - name: lombok-ast + scm: git + url: https://github.com/rzwitserloot/lombok.ast + reference: v0.2 + excludes: + - '**/lombok-ast/test/**/*' + + - name: spring-framework + scm: git + url: https://github.com/spring-projects/spring-framework + reference: v4.1.6.RELEASE + + - name: hibernate-orm + scm: git + url: https://github.com/hibernate/hibernate-orm + reference: 4.2.19.Final + excludes: + - '**/hibernate-orm/documentation/**/*' + + - name: elasticsearch + scm: git + url: https://github.com/elastic/elasticsearch + reference: v1.5.2 + + - name: java-design-patterns + scm: git + url: https://github.com/iluwatar/java-design-patterns + reference: dd855a376bc025aa61f6816584f79eb9854fe5d7 + + - name: MaterialDesignLibrary + scm: git + url: https://github.com/navasmdc/MaterialDesignLibrary + reference: 1.3 + + - name: Hbase + scm: git + url: https://github.com/apache/hbase + reference: 1.1.0.1 + + - name: Orekit + scm: git + url: https://github.com/CS-SI/Orekit + reference: 8.0.1 + + # Those projects are quite old and have a lot of legacy code + - name: apache-ant + scm: git + url: https://github.com/apache/ant + reference: ANT_194 + excludes: + - '**/apache-ant/src/tests/**/*' + - '**/apache-ant/src/etc/testcases/' + + - name: apache-jsecurity + scm: git + url: https://github.com/apache/jsecurity + reference: c2ac5b90a467aedb04b52ae50a99e83207d847b3 + + - name: android-launcher + scm: git + url: https://github.com/android/platform_packages_apps_launcher + reference: android-2.1_r2.1p2 + + - name: apache-struts + scm: git + url: https://github.com/apache/struts.git + reference: master + excludes: + - '**/apache-struts/**/resources/**/*' + + # Projects which contain a lot of lambda expressions + - name: infinispan + scm: git + url: https://github.com/infinispan/infinispan + reference: 7.2.5.Final + + - name: protonpack + scm: git + url: https://github.com/poetix/protonpack + reference: protonpack-1.7 + + - name: jOOL + scm: git + url: https://github.com/jOOQ/jOOL + reference: version-0.9.7 + + - name: RxJava + scm: git + url: https://github.com/ReactiveX/RxJava + reference: v1.0.9 + + - name: Vavr + scm: git + url: https://github.com/vavr-io/vavr + reference: v0.9.0