From 4e403d4bbc1fd16b8e312320021cbfceb76623a2 Mon Sep 17 00:00:00 2001 From: piyush kumar sadangi Date: Mon, 27 May 2024 15:35:51 +0530 Subject: [PATCH] Issue #866: Convert project-to-test into yaml --- .ci/validation.sh | 24 +- appveyor.yml | 4 +- checkstyle-tester/README.md | 22 +- checkstyle-tester/README_MANUAL_EXECUTION.md | 22 +- checkstyle-tester/README_OLD.md | 4 +- checkstyle-tester/diff.groovy | 5 - checkstyle-tester/launch.sh | 2 +- checkstyle-tester/launch_diff.sh | 16 +- checkstyle-tester/launch_diff_antlr.sh | 10 +- .../multi_config_check_regression.groovy | 4 +- .../projects-to-test-on.properties | 57 --- checkstyle-tester/projects-to-test-on.yml | 439 ++++++++++++++++++ checkstyle-tester/sevntu_launch_diff.sh | 16 +- patch-diff-report-tool/README.md | 4 +- 14 files changed, 503 insertions(+), 126 deletions(-) delete mode 100644 checkstyle-tester/projects-to-test-on.properties create mode 100644 checkstyle-tester/projects-to-test-on.yml diff --git a/.ci/validation.sh b/.ci/validation.sh index fcab7ea9..146a2d54 100755 --- a/.ci/validation.sh +++ b/.ci/validation.sh @@ -37,10 +37,10 @@ checkstyle-tester-diff-groovy-patch) cd .ci-temp/checkstyle git checkout -b patch-branch cd ../../checkstyle-tester - cp projects-to-test-on.properties ../.ci-temp/projects-to-test-on.properties - sed -i'' 's/^guava/#guava/' ../.ci-temp/projects-to-test-on.properties - sed -i'' 's/#checkstyle/checkstyle/' ../.ci-temp/projects-to-test-on.properties - groovy diff.groovy -l ../.ci-temp/projects-to-test-on.properties \ + cp projects-to-test-on.yml ../.ci-temp/projects-to-test-on.yml + sed -i'' 's/^guava/#guava/' ../.ci-temp/projects-to-test-on.yml + sed -i'' 's/#checkstyle/checkstyle/' ../.ci-temp/projects-to-test-on.yml + groovy diff.groovy -l ../.ci-temp/projects-to-test-on.yml \ -c my_check.xml -b master -p patch-branch -r ../.ci-temp/checkstyle ;; @@ -49,7 +49,7 @@ checkstyle-tester-diff-groovy-base-patch) cd .ci-temp/checkstyle git checkout -b patch-branch cd ../../checkstyle-tester - groovy diff.groovy -l projects-to-test-on.properties \ + groovy diff.groovy -l projects-to-test-on.yml \ -bc my_check.xml -pc my_check.xml -b master -p patch-branch -r ../.ci-temp/checkstyle ;; @@ -58,7 +58,7 @@ checkstyle-tester-diff-groovy-patch-only) cd .ci-temp/checkstyle git checkout -b patch-branch cd ../../checkstyle-tester - groovy diff.groovy -l projects-to-test-on.properties \ + groovy diff.groovy -l projects-to-test-on.yml \ -pc my_check.xml -p patch-branch -r ../.ci-temp/checkstyle -m single ;; @@ -70,20 +70,20 @@ checkstyle-tester-diff-groovy-regression-single) # Run report from master branch of contribution checkout_from https://github.com/checkstyle/contribution cd .ci-temp/contribution/checkstyle-tester - sed -i'' 's/^guava/#guava/' projects-to-test-on.properties - sed -i'' 's/#checkstyle|/checkstyle|/' projects-to-test-on.properties + sed -i'' 's/^guava/#guava/' projects-to-test-on.yml + sed -i'' 's/#checkstyle|/checkstyle|/' projects-to-test-on.yml export MAVEN_OPTS="-Xmx2048m" - groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \ + groovy ./diff.groovy --listOfProjects projects-to-test-on.yml \ -pc ../../../checkstyle-tester/diff-groovy-regression-config.xml \ -r ../../checkstyle -xm "-Dcheckstyle.failsOnError=false" \ -m single -p master # Run report with current branch cd ../../../checkstyle-tester/ - sed -i'' 's/^guava/#guava/' projects-to-test-on.properties - sed -i'' 's/#checkstyle|/checkstyle|/' projects-to-test-on.properties + sed -i'' 's/^guava/#guava/' projects-to-test-on.yml + sed -i'' 's/#checkstyle|/checkstyle|/' projects-to-test-on.yml rm -rf reports repositories - groovy ./diff.groovy --listOfProjects projects-to-test-on.properties \ + groovy ./diff.groovy --listOfProjects projects-to-test-on.yml \ -pc diff-groovy-regression-config.xml -r ../.ci-temp/checkstyle/ \ -m single -p master -xm "-Dcheckstyle.failsOnError=false" diff --git a/appveyor.yml b/appveyor.yml index 1d06ad5a..8f8a307d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -74,7 +74,7 @@ environment: CMD3: " && cd checkstyle && git checkout -b patch-branch" CMD4: " " CMD5: " && cd ..\\checkstyle-tester " - CMD6: " && groovy diff.groovy -l projects-to-test-on.properties -c my_check.xml -b master -p patch-branch -r C:\\projects\\contribution\\checkstyle -s" + CMD6: " && groovy diff.groovy -l projects-to-test-on.yml -c my_check.xml -b master -p patch-branch -r C:\\projects\\contribution\\checkstyle -s" - JAVA_HOME: C:\Program Files\Java\jdk11 DESC: "checkstyle-tester (diff.groovy with base and patch configs) on guava" CMD1: " git clone -q --depth=10 --branch=master " @@ -82,7 +82,7 @@ environment: CMD3: " && cd checkstyle && git checkout -b patch-branch" CMD4: " " CMD5: " && cd ..\\checkstyle-tester " - CMD6: " && groovy diff.groovy -l projects-to-test-on.properties -bc my_check.xml -pc my_check.xml -b master -p patch-branch -r C:\\projects\\contribution\\checkstyle -s" + CMD6: " && groovy diff.groovy -l projects-to-test-on.yml -bc my_check.xml -pc my_check.xml -b master -p patch-branch -r C:\\projects\\contribution\\checkstyle -s" build_script: - ps: > diff --git a/checkstyle-tester/README.md b/checkstyle-tester/README.md index 18f0cda0..dda3257e 100644 --- a/checkstyle-tester/README.md +++ b/checkstyle-tester/README.md @@ -1,7 +1,7 @@ # CHECKSTYLE-TESTER checkstyle-tester is a tool for Checkstyle report generation over very -[basic set of external projects](https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.properties). +[basic set of external projects](https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.yml). checkstyle-tester generates reports from violations printed from a supplied user config over the aforementioned projects. The generated reports are in HTML format. They can be viewed in any browser and can be posted online for others to view. @@ -78,7 +78,7 @@ When the script finishes its work the following directory structure will be crea in the root of checkstyle-tester directory: */repositories* - directory with downloaded projects sources which are specified -in projects-to-test-on.properties; +in projects-to-test-on.yml; */reports/diff* - directory with diff reports; @@ -120,7 +120,7 @@ Should be used with `Diff Regression config:` 3) **Conditional** `New module config: {{URI to new_module_config.xml}}` Report configuration [template][template_my_check] for new modules, e.g. for new check. -4) **Optional** `Diff Regression projects: {{URI to projects-to-test-on.properties}}` +4) **Optional** `Diff Regression projects: {{URI to projects-to-test-on.yml}}` Link to custom list of projects ([template][projects-to-test-on_prp]). If no list is provided, [default][for-github-action_prp] list is taken. @@ -145,7 +145,7 @@ To check the job, you can open "Actions" tab and find your job there. #### Examples of URIs -- https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/projects-to-test-on.properties +- https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/projects-to-test-on.yml - https://gist.githubusercontent.com/strkkk/121653f4a334be38b9e77e4245e144e2/raw/691fe6e90ff40473707ce77518b7a0b058bd0955/config.xml @@ -209,7 +209,7 @@ the custom configuration created with all the permutations. ```bash groovy diff.groovy --localGitRepo /home/johndoe/projects/checkstyle \ --baseBranch i111-my-fix --patchBranch i111-my-fix-mutation \ - --config config.xml --listOfProjects projects-to-test-on.properties + --config config.xml --listOfProjects projects-to-test-on.yml ``` ATTENTION: @@ -267,7 +267,7 @@ You may modify all the checks that depend on external files to use default setti of the configuration files, you should use the [`my_check.xml`] (https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/my_check.xml) file as a base**, and add the checks from `checkstyle-checks.xml` to it. Then `diff.groovy` -should be run on all projects in `projects-to-test-on.properties`, using the `diff.groovy` +should be run on all projects in `projects-to-test-on.yml`, using the `diff.groovy` script once for each configuration file. [See instructions above] (https://github.com/checkstyle/contribution/tree/master/checkstyle-tester#basic-difference-report) @@ -281,13 +281,13 @@ This report is generated using the [`launch_diff_antlr.sh`] (https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/launch_diff_antlr.sh) script. This script generates a report based on the differences in the ASTs generated from your PR branch and Checkstyle's 'main' branch using projects that are selected -(uncommented) in the [`projects-to-test-on.properties`] -(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.properties) +(uncommented) in the [`projects-to-test-on.yml`] +(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.yml) file. For the ANTLR regression report, we usually only want to see that changes to the Checkstyle project. To ensure that you test against any new inputs that you have created (unit test inputs, etc.), please make sure that you comment out -all other projects, and add the following line to [`projects-to-test-on.properties`] -(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.properties): +all other projects, and add the following line to [`projects-to-test-on.yml`] +(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.yml): ```bash my-checkstyle|git|https://github.com//checkstyle.git||| @@ -326,4 +326,4 @@ Windows users should use the `SET` command instead of the `export` command. [template_my_check]:https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/my_check.xml [for-github-action_prp]:https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/projects-to-test-on-for-github-action.properties -[projects-to-test-on_prp]:https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/projects-to-test-on.properties +[projects-to-test-on_prp]:https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/projects-to-test-on.yml diff --git a/checkstyle-tester/README_MANUAL_EXECUTION.md b/checkstyle-tester/README_MANUAL_EXECUTION.md index 87daebe1..019da48e 100644 --- a/checkstyle-tester/README_MANUAL_EXECUTION.md +++ b/checkstyle-tester/README_MANUAL_EXECUTION.md @@ -5,20 +5,20 @@ Before you are ready to execute `diff.groovy`, you will have to prepare some external files and branches first. -### projects-to-test-on.properties +### projects-to-test-on.yml -`projects-to-test-on.properties` lists all the projects that `diff.groovy` will execute. +`projects-to-test-on.yml` lists all the projects that `diff.groovy` will execute. Anything that starts with `#` is considered a comment and is ignored. -`projects-to-test-on.properties` is expected to be in the following format: +`projects-to-test-on.yml` is expected to be in the following format: `REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]|` -You should modify `projects-to-test-on.properties` and test as many projects as possible. +You should modify `projects-to-test-on.yml` and test as many projects as possible. Each project has its own unique style and it is common to find new and different violations in 1 and not the others. You can also specify projects that are already available on your local file system -in `projects-to-test-on.properties`. +in `projects-to-test-on.yml`. For this you can either use `git` or `hg` type which will clone the local repository into the workspace and use the specified branch. Alternatively you can use `local` type, where the specified branch is ignored and @@ -114,14 +114,14 @@ that specify the report you want generated. ```bash groovy diff.groovy --localGitRepo /home/johndoe/projects/checkstyle \ --baseBranch master --patchBranch i111-my-fix --config my_check.xml \ - --listOfProjects projects-to-test-on.properties + --listOfProjects projects-to-test-on.yml ``` or with short command line arguments names: ```bash groovy diff.groovy -r /home/johndoe/projects/checkstyle \ - -b master -p i111-my-fix -c my_check.xml -l projects-to-test-on.properties + -b master -p i111-my-fix -c my_check.xml -l projects-to-test-on.yml ``` #### Difference Report with Different Base and Patch Config @@ -132,14 +132,14 @@ patch branch use the following command: ```bash groovy diff.groovy --localGitRepo /home/johndoe/projects/checkstyle \ --baseBranch master --patchBranch i111-my-fix --baseConfig base_config.xml \ - --patchConfig patch_config.xml --listOfProjects projects-to-test-on.properties + --patchConfig patch_config.xml --listOfProjects projects-to-test-on.yml ``` or with short command line arguments names: ```bash groovy diff.groovy -r /home/johndoe/projects/checkstyle -b master -p i111-my-fix \ - -bc base_config.xml -pc patch_config.xml -l projects-to-test-on.properties + -bc base_config.xml -pc patch_config.xml -l projects-to-test-on.yml ``` #### Basic Single Report @@ -150,14 +150,14 @@ use the following command: ```bash groovy diff.groovy --localGitRepo /home/johndoe/projects/checkstyle --patchBranch \ i111-my-fix --patchConfig patch_config.xml \ - --listOfProjects projects-to-test-on.properties --mode single` + --listOfProjects projects-to-test-on.yml --mode single` ``` or with short command line arguments names: ```bash groovy diff.groovy -r /home/johndoe/projects/checkstyle -p i111-my-fix \ - -pc patch_config.xml -l projects-to-test-on.properties -m single + -pc patch_config.xml -l projects-to-test-on.yml -m single ``` ## Deploying Report diff --git a/checkstyle-tester/README_OLD.md b/checkstyle-tester/README_OLD.md index f52547a6..f38fc657 100644 --- a/checkstyle-tester/README_OLD.md +++ b/checkstyle-tester/README_OLD.md @@ -1,7 +1,7 @@ # CHECKSTYLE-TESTER Launch command for testing against google_checks.xml and very [basic set of java projects] -(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.properties): +(https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/projects-to-test-on.yml): ```bash ./launch.sh @@ -69,7 +69,7 @@ to generate compact diff report before and after your change please use tool ATTENTION: -you can specify at projects-to-test-on.properties path to local file system if you have some +you can specify at projects-to-test-on.yml path to local file system if you have some repositories on your local, example: "checkstyle=/home/username/java/git-repos/checkstyle/checkstyle". diff --git a/checkstyle-tester/diff.groovy b/checkstyle-tester/diff.groovy index aa088f2a..6a5640b7 100644 --- a/checkstyle-tester/diff.groovy +++ b/checkstyle-tester/diff.groovy @@ -272,11 +272,6 @@ def generateCheckstyleReport(cfg) { project -> if (!project.startsWith('#') && !project.isEmpty()) { def params = project.split('\\|', -1) - if (params.length < fullParamListSize) { - throw new InvalidPropertiesFormatException("Error: line '$project' " + - "in file '$listOfProjectsFile.name' should have $fullParamListSize " + - "pipe-delimited sections!") - } def repoName = params[repoNameParamNo] def repoType = params[repoTypeParamNo] diff --git a/checkstyle-tester/launch.sh b/checkstyle-tester/launch.sh index ec279bc5..d4faf516 100755 --- a/checkstyle-tester/launch.sh +++ b/checkstyle-tester/launch.sh @@ -57,7 +57,7 @@ while read line ; do echo -e "$REPO_NAME is synchronized\n" -done < projects-to-test-on.properties +done < projects-to-test-on.yml echo "Running 'mvn clean' on $SOURCES_DIR ..." mvn --batch-mode clean diff --git a/checkstyle-tester/launch_diff.sh b/checkstyle-tester/launch_diff.sh index a557e169..45f53fa9 100644 --- a/checkstyle-tester/launch_diff.sh +++ b/checkstyle-tester/launch_diff.sh @@ -141,23 +141,23 @@ function launch { while read line ; do [[ "$line" == \#* ]] && continue # Skip lines with comments [[ -z "$line" ]] && continue # Skip empty lines - + REPO_NAME=`echo $line | cut -d '|' -f 1` REPO_TYPE=`echo $line | cut -d '|' -f 2` REPO_URL=` echo $line | cut -d '|' -f 3` COMMIT_ID=`echo $line | cut -d '|' -f 4` EXCLUDES=` echo $line | cut -d '|' -f 5` - + echo "Running Launch on $REPO_NAME ..." - + if [ ! -d "$REPOSITORIES_DIR" ]; then mkdir $REPOSITORIES_DIR fi CURRENT_REPO_DIR="" - + if [ "$REPO_TYPE" == "git" ]; then GITPATH=$REPOSITORIES_DIR/$REPO_NAME - + if [ ! -d "$GITPATH" ]; then echo "Cloning $REPO_TYPE repository '${REPO_NAME}' ..." git clone $REPO_URL $GITPATH @@ -216,7 +216,7 @@ function launch { fi echo "Running Launch on $REPO_NAME - completed" - done < $TESTER_DIR/projects-to-test-on.properties + done < $TESTER_DIR/projects-to-test-on.yml } function containsElement { @@ -341,11 +341,11 @@ if $RUN_REPORTS ; then while read line ; do [[ "$line" == \#* ]] && continue # Skip lines with comments [[ -z "$line" ]] && continue # Skip empty lines - + REPO_NAME=`echo $line | cut -d '|' -f 1` EXTPROJECTS+=($REPO_NAME) - done < $TESTER_DIR/projects-to-test-on.properties + done < $TESTER_DIR/projects-to-test-on.yml fi echo "Starting all Reports" diff --git a/checkstyle-tester/launch_diff_antlr.sh b/checkstyle-tester/launch_diff_antlr.sh index dc465435..f613c861 100755 --- a/checkstyle-tester/launch_diff_antlr.sh +++ b/checkstyle-tester/launch_diff_antlr.sh @@ -75,23 +75,23 @@ function launch { while read line ; do [[ "$line" == \#* ]] && continue # Skip lines with comments [[ -z "$line" ]] && continue # Skip empty lines - + REPO_NAME=`echo $line | cut -d '|' -f 1` REPO_TYPE=`echo $line | cut -d '|' -f 2` REPO_URL=` echo $line | cut -d '|' -f 3` COMMIT_ID=`echo $line | cut -d '|' -f 4` EXCLUDES=` echo $line | cut -d '|' -f 5` - + echo "Running Launches on $REPO_NAME ..." if [ ! -d "$REPOSITORIES_DIR" ]; then mkdir $REPOSITORIES_DIR fi REPO_SOURCES_DIR= - + if [ "$REPO_TYPE" == "git" ]; then GITPATH=$REPOSITORIES_DIR/$REPO_NAME - + if [ ! -d "$GITPATH" ]; then echo "Cloning $REPO_TYPE repository '${REPO_NAME}' ..." git clone $REPO_URL $GITPATH @@ -167,7 +167,7 @@ echo "$f" fi echo "Running Launch on $REPO_NAME - completed" - done < $TESTER_DIR/projects-to-test-on.properties + done < $TESTER_DIR/projects-to-test-on.yml } function containsElement { diff --git a/checkstyle-tester/multi_config_check_regression.groovy b/checkstyle-tester/multi_config_check_regression.groovy index 9ff28c63..b26e2739 100644 --- a/checkstyle-tester/multi_config_check_regression.groovy +++ b/checkstyle-tester/multi_config_check_regression.groovy @@ -36,11 +36,11 @@ static void main(String[] args) { def configFilesDir = cliOptions.configDir def outputDirectory = cliOptions.outputDir def patchBranch = cliOptions.patchBranch - def projectsToTestOn = new File("projects-to-test-on.properties") + def projectsToTestOn = new File("projects-to-test-on.yml") println "Running check regression reports for patch branch: ${patchBranch}." println "Make sure that you have selected (uncommented)" + - " correct projects from projects-to-test-on.properties!" + " correct projects from projects-to-test-on.yml!" def reportDirectoryName = java.time.LocalDate.now().toString() + "_" + patchBranch + "_reports"; diff --git a/checkstyle-tester/projects-to-test-on.properties b/checkstyle-tester/projects-to-test-on.properties deleted file mode 100644 index bed14258..00000000 --- a/checkstyle-tester/projects-to-test-on.properties +++ /dev/null @@ -1,57 +0,0 @@ -# List of GIT repositories to clone / pull for checking with Checkstyle -# File format: REPO_NAME|[local|git]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS] -# Please note that bash comments works in this file - -# Few projects that delivers set of unusual Java constructions that shall be correctly handled by AST visitor -# 'InputAllEscapedUnicodeCharacters' must be skipped because it is too big and slows down JXR -#checkstyle|git|https://github.com/checkstyle/checkstyle.git|master|**/.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,**/resources-noncompilable/**/javaparser/InputJavaParser.java,**/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java,**/resources-noncompilable/**/grammar/java19/* -#sevntu-checkstyle|git|https://github.com/sevntu-checkstyle/sevntu.checkstyle|master|| -#checkstyle-sonar|git|https://github.com/checkstyle/sonar-checkstyle|master|| - -# we exclude files listed in https://github.com/checkstyle/checkstyle/blob/master/.ci/openjdk17-excluded.files -# openjdk17|git|https://github.com/openjdk/jdk17.git|master|**/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/unicode/SupplementaryJavaID1.java,**/test/langtools/tools/javac/unicode/SupplementaryJavaID5.java,**/test/langtools/tools/javac/unicode/TripleQuote.java,**/test/langtools/tools/javac/unicode/SupplementaryJavaID4.java,**/test/langtools/tools/javac/unicode/SupplementaryJavaID2.java,**/test/langtools/tools/javac/unicode/SupplementaryJavaID6.java,**/test/langtools/tools/javac/unicode/NonasciiDigit.java,**/test/langtools/tools/javac/unicode/SupplementaryJavaID3.java,**/test/langtools/tools/javac/parser/8081769/T8081769.java,**/test/langtools/tools/javac/parser/7157165/T7157165.java,**/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.java,**/test/langtools/tools/javac/parser/MissingClosingBrace.java,**/test/langtools/tools/javac/parser/T4881269.java,**/test/langtools/tools/javac/parser/ErroneousParameters.java,**/test/langtools/tools/javac/failover/FailOver15.java,**/test/langtools/tools/javac/failover/FailOver01.java,**/test/langtools/tools/javac/ExtendArray.java,**/test/langtools/tools/javac/generics/6413682/T6413682.java,**/test/langtools/tools/javac/annotations/neg/Z13.java,**/test/langtools/tools/javac/annotations/neg/Z8.java,**/test/langtools/tools/javac/annotations/neg/NoStatic.java,**/test/langtools/tools/javac/annotations/neg/Syntax1.java,**/test/langtools/tools/javac/annotations/neg/Z9.java,**/test/langtools/tools/javac/annotations/neg/AnnComma.java,**/test/langtools/tools/javac/annotations/neg/Z3.java,**/test/langtools/tools/javac/annotations/neg/Z2.java,**/test/langtools/tools/javac/annotations/neg/Z14.java,**/test/langtools/tools/javac/annotations/neg/Z5.java,**/test/langtools/tools/javac/annotations/neg/NoDefault.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/OldArray.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/IndexArray.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedMethodSelectorTest.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/DotClass.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/IncompleteArray.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedClassExpr.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedImport.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/StaticFields.java,**/test/langtools/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java,**/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.java,**/test/langtools/tools/javac/BadAnnotation.java,**/test/langtools/tools/javac/ExtraneousEquals.java,**/test/langtools/tools/javac/ImportUnnamed/foo/A.java,**/test/langtools/tools/javac/processing/6994946/SyntaxErrorTest.java,**/test/langtools/tools/javac/processing/errors/TestParseErrors/ParseErrors.java,**/test/langtools/tools/javac/UncaughtOverflow.java,**/test/langtools/tools/javac/6440583/A.java,**/test/langtools/tools/javac/EOI.java,**/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java,**/test/langtools/tools/javac/SwitchScope.java,**/test/langtools/tools/javac/incompleteStatements/T8000484.java,**/test/langtools/tools/javac/quid/T6999438.java,**/test/langtools/tools/javac/T8175198/AnnotationsAndFormalParamsTest.java,**/test/langtools/tools/javac/Parens3.java,**/test/langtools/tools/javac/T8185983/RejectTypeArgsOnSelectTest.java,**/test/langtools/tools/javac/TryWithResources/TwrForVariable2.java,**/test/langtools/tools/javac/TryWithResources/ResDeclOutsideTry.java,**/test/langtools/tools/javac/TryWithResources/PlainTry.java,**/test/langtools/tools/javac/TryWithResources/BadTwrSyntax.java,**/test/langtools/tools/javac/enum/EnumMembersOrder.java,**/test/langtools/tools/javac/enum/EnumAsIdentifier.java,**/test/langtools/tools/javac/rawDiags/Error.java,**/test/langtools/tools/javac/8245153/T8245153.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/switchextra/SwitchStatementBroken2.java,**/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java,**/test/langtools/tools/javac/Digits.java,**/test/langtools/tools/javac/LabeledDeclaration.java,**/test/langtools/tools/javac/DefiniteAssignment/ConstantInfiniteWhile.java,**/test/langtools/tools/javac/BadHexConstant.java,**/test/langtools/tools/javac/diags/examples/IllegalStartOfExpr.java,**/test/langtools/tools/javac/diags/examples/RecordsCantDeclareComponentModifiers.java,**/test/langtools/tools/javac/diags/examples/TryWithoutCatchOrFinallyOrResource.java,**/test/langtools/tools/javac/diags/examples/RecordsComponentsCanNotDeclareCStyleArrays.java,**/test/langtools/tools/javac/diags/examples/ExpectedModule.java,**/test/langtools/tools/javac/diags/examples/EnumAsIdentifier2.java,**/test/langtools/tools/javac/diags/examples/TextBlockCloseDelimiter.java,**/test/langtools/tools/javac/diags/examples/IllegalNonAsciiDigit.java,**/test/langtools/tools/javac/diags/examples/IntNumberTooLarge.java,**/test/langtools/tools/javac/diags/examples/VarargsAndReceiver.java,**/test/langtools/tools/javac/diags/examples/EmptyCharLiteral.java,**/test/langtools/tools/javac/diags/examples/IncorrectRecordDeclaration.java,**/test/langtools/tools/javac/diags/examples/PrematureEOF.java,**/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java,**/test/langtools/tools/javac/diags/examples/InvalidHexNumber.java,**/test/langtools/tools/javac/diags/examples/CallMustBeFirst.java,**/test/langtools/tools/javac/diags/examples/ThrowsNotAllowedInAnno.java,**/test/langtools/tools/javac/diags/examples/IllegalStartOfType.java,**/test/langtools/tools/javac/diags/examples/TryWithResourcesExprNeedsVar.java,**/test/langtools/tools/javac/diags/examples/Expected2.java,**/test/langtools/tools/javac/diags/examples/FinallyWithoutTry.java,**/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveTypeParams.java,**/test/langtools/tools/javac/diags/examples/IllegalLineEndInCharLit.java,**/test/langtools/tools/javac/diags/examples/UnclosedStringLiteral.java,**/test/langtools/tools/javac/diags/examples/Expected3.java,**/test/langtools/tools/javac/diags/examples/DefaultAllowedInIntfAnnotationMember.java,**/test/langtools/tools/javac/diags/examples/AnnotationMustBeNameValue.java,**/test/langtools/tools/javac/diags/examples/Orphaned.java,**/test/langtools/tools/javac/diags/examples/ArrayDimMissing.java,**/test/langtools/tools/javac/diags/examples/NotAllowedClass.java,**/test/langtools/tools/javac/diags/examples/ExplicitImplicitLambda.java,**/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveParams.java,**/test/langtools/tools/javac/diags/examples/ProcessorWrongType/ProcessorWrongType.java,**/test/langtools/tools/javac/diags/examples/ForeachBadInitialization.java,**/test/langtools/tools/javac/diags/examples/EnumConstantNotExpected.java,**/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java,**/test/langtools/tools/javac/diags/examples/IllegalEscapeChar.java,**/test/langtools/tools/javac/diags/examples/IllegalChar.java,**/test/langtools/tools/javac/diags/examples/VarargsMustBeLast.java,**/test/langtools/tools/javac/diags/examples/IllegalDot.java,**/test/langtools/tools/javac/diags/examples/IllegalUnderscore.java,**/test/langtools/tools/javac/diags/examples/NotAllowedVariable.java,**/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java,**/test/langtools/tools/javac/diags/examples/UnclosedCharLiteral.java,**/test/langtools/tools/javac/diags/examples/AssertAsIdentifier2.java,**/test/langtools/tools/javac/diags/examples/ThisAsIdentifier.java,**/test/langtools/tools/javac/diags/examples/ModuleDeclSbInModuleInfoJava.java,**/test/langtools/tools/javac/diags/examples/DotClassExpected.java,**/test/langtools/tools/javac/diags/examples/CantExtendIntfAnno.java,**/test/langtools/tools/javac/diags/examples/IntfAnnotationCantHaveTypeParams.java,**/test/langtools/tools/javac/diags/examples/CatchWithoutTry.java,**/test/langtools/tools/javac/diags/examples/MalformedFpLit.java,**/test/langtools/tools/javac/diags/examples/IdentifierExpected.java,**/test/langtools/tools/javac/diags/examples/InitializerNotAllowed.java,**/test/langtools/tools/javac/diags/examples/IllegalArrayCreation.java,**/test/langtools/tools/javac/diags/examples/VarAllOrNothing.java,**/test/langtools/tools/javac/diags/examples/UnclosedComment.java,**/test/langtools/tools/javac/diags/examples/EnumConstantExpected.java,**/test/langtools/tools/javac/diags/examples/IllegalStartOfStmt.java,**/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java,**/test/langtools/tools/javac/diags/examples/CannotCreateArrayWithTypeArgs.java,**/test/langtools/tools/javac/diags/examples/IllegalAnnotationDeclaration.java,**/test/langtools/tools/javac/diags/examples/ElseWithoutIf.java,**/test/langtools/tools/javac/api/T6265137a.java,**/test/langtools/tools/javac/api/TestGetElementReferenceDataWithErrors.java,**/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java,**/test/langtools/tools/javac/IllegalAnnotation.java,**/test/langtools/tools/javac/T6882235.java,**/test/langtools/tools/javac/QualifiedAccess/QualifiedAccess_4.java,**/test/langtools/tools/javac/policy/test3/A.java,**/test/langtools/tools/javac/patterns/PatternCaseErrorRecovery.java,**/test/langtools/tools/javac/patterns/NoModifiersOnBinding.java,**/test/langtools/tools/javac/literals/BadBinaryLiterals.java,**/test/langtools/tools/javac/literals/BadUnderscoreLiterals.java,**/test/langtools/tools/javac/literals/T6891079.java,**/test/langtools/tools/javac/T4994049/T4994049.java,**/test/langtools/jdk/javadoc/doclet/testSourceTab/SingleTab/C.java,**/test/langtools/jdk/javadoc/doclet/testSourceTab/DoubleTab/C.java,**/test/langtools/jdk/javadoc/doclet/testUnnamedPackage/src1/BadSource.java,**/test/langtools/jdk/javadoc/tool/6964914/Error.java,**/test/langtools/jdk/javadoc/tool/T4994049/FileWithTabs.java,**/test/langtools/tools/javac/annotations/neg/pkg/package-info.java| -guava|git|https://github.com/google/guava|v28.2|| - -#spotbugs|git|https://github.com/spotbugs/spotbugs|3.1.2|| -#pmd|git|https://github.com/pmd/pmd|pmd_releases/6.21.0|**/pmd/pmd-java/src/test/**/*,**/pmd/cpd/files/* -#spoon|git|https://github.com/INRIA/spoon.git|spoon-core-10.1.0|**/src/test/resources/**/* -#lombok-ast|git|https://github.com/rzwitserloot/lombok.ast|v0.2|**/lombok-ast/test/**/* - -#spring-framework|git|https://github.com/spring-projects/spring-framework|v4.1.6.RELEASE|| -#hibernate-orm|git|https://github.com/hibernate/hibernate-orm|4.2.19.Final|**/hibernate-orm/documentation/**/* -#elasticsearch|git|https://github.com/elastic/elasticsearch|v1.5.2|| -#java-design-patterns|git|https://github.com/iluwatar/java-design-patterns|dd855a376bc025aa61f6816584f79eb9854fe5d7|| -#MaterialDesignLibrary|git|https://github.com/navasmdc/MaterialDesignLibrary|1.3|| -#Hbase|git|https://github.com/apache/hbase|1.1.0.1|| -#Orekit|git|https://github.com/CS-SI/Orekit|8.0.1|| - -# Those projects are quite old and have lot of legacy code -#apache-ant|git|https://github.com/apache/ant|ANT_194|**/apache-ant/src/tests/**/*,**/apache-ant/src/etc/testcases/ -#apache-jsecurity|git|https://github.com/apache/jsecurity|c2ac5b90a467aedb04b52ae50a99e83207d847b3|| -#android-launcher|git|https://github.com/android/platform_packages_apps_launcher|android-2.1_r2.1p2|| -#apache-struts|git|https://github.com/apache/struts.git|master|**/apache-struts/**/resources/**/* - -# Projects which contain a lot of labmda expressions -#infinispan|git|https://github.com/infinispan/infinispan|7.2.5.Final|| -#protonpack|git|https://github.com/poetix/protonpack|protonpack-1.7|| -#jOOL|git|https://github.com/jOOQ/jOOL|version-0.9.7|| -#RxJava|git|https://github.com/ReactiveX/RxJava|v1.0.9|| -#Vavr|git|https://github.com/vavr-io/vavr|v0.9.0|| - -# Few projects with excludes to decrease a number of checked files (usefull for some checks which specify overly strong code style policy) -#checkstyle-with-excludes|git|https://github.com/checkstyle/checkstyle.git|master|**/checkstyle-with-excludes/src/test/**/*,**/checkstyle-with-excludes/src/it/resources/**/*,**/resources-noncompilable/**/* -#sevntu-checkstyle-with-excludes|git|https://github.com/sevntu-checkstyle/sevntu.checkstyle|master|**/sevntu-checkstyle-with-excludes/sevntu-checks/src/test/**/* -#spotbugs-with-excldues|git|https://github.com/spotbugs/spotbugs|3.1.2|**/spotbugs-with-excldues/eclipsePlugin-test/**/*,**/spotbugs-with-excldues/spotbugsTestCases/**/*,**/spotbugs-with-excldues/JSR305-testCases/**/* -#hibernate-orm-with-excludes|git|https://github.com/hibernate/hibernate-orm|4.2.19.Final|**/hibernate-orm-with-excludes/documentation/**/*,**/hibernate-orm-with-excludes/**/src/test/**/* - -# Guava with excldues to generate reports only for those files which are not excluded in Guava's pom.xml for checkstyle-maven-plugin -# See https://github.com/checkstyle/checkstyle/wiki/How-to-generate-Checkstyle-report-for-Google-Guava-project -#guava-mvnstyle|git|https://github.com/google/guava|v28.2|**/guava-mvnstyle/**/test/**/*,**/guava-mvnstyle/guava-gwt/src-super/**/*,**/guava-mvnstyle/guava-gwt/test-super/**/*,**/guava-mvnstyle/guava-tests/**/* - -# custom javadoc tags -#nbia-dcm4che-tools|git|https://github.com/thprakash/nbia-dcm4che-tools|c3591e6f0f84827586db25abded6708e5386ef1a|| -# RequireThis usage -#spring-integration|git|https://github.com/spring-projects/spring-integration.git|origin/main| - -#local-checkstyle|local|../../../|master|**/.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,**/resources-noncompilable/**/javaparser/InputJavaParser.java,**/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java,**/target/test-classes/**/* - diff --git a/checkstyle-tester/projects-to-test-on.yml b/checkstyle-tester/projects-to-test-on.yml new file mode 100644 index 00000000..9268c1db --- /dev/null +++ b/checkstyle-tester/projects-to-test-on.yml @@ -0,0 +1,439 @@ +# List of GIT repositories to clone / pull for checking with Checkstyle +# File format: +# REPO_NAME: +# type: [local|git] +# url: URL +# commit_id: COMMIT_ID +# exclude_folders: +# - EXCLUDE_FOLDER_1 +# - EXCLUDE_FOLDER_2 + + +# Few projects that delivers set of unusual Java constructions that shall be correctly handled by AST visitor +# 'InputAllEscapedUnicodeCharacters' must be skipped because it is too big and slows down JXR +checkstyle: + type: git + url: https://github.com/checkstyle/checkstyle.git + commit_id: master + enabled: false + exclude_folders: + - **/.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 + - **/resources-noncompilable/**/javaparser/InputJavaParser.java + - **/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java + - **/resources-noncompilable/**/grammar/java19/* + +sevntu-checkstyle: + type: git + url: https://github.com/sevntu-checkstyle/sevntu.checkstyle.git + commit_id: master + enabled: false + +checkstyle-sonar: + type: git + url: https://github.com/checkstyle/sonar-checkstyle.git + commit_id: master + enabled: false + +# we exclude files listed in https://github.com/checkstyle/checkstyle/blob/master/.ci/openjdk17-excluded.files +openjdk17: + type: git + url: https://github.com/openjdk/jdk17.git + commit_id: master + enabled: false + exclude_folders: + - **/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/unicode/SupplementaryJavaID1.java + - **/test/langtools/tools/javac/unicode/SupplementaryJavaID5.java + - **/test/langtools/tools/javac/unicode/TripleQuote.java + - **/test/langtools/tools/javac/unicode/SupplementaryJavaID4.java + - **/test/langtools/tools/javac/unicode/SupplementaryJavaID2.java + - **/test/langtools/tools/javac/unicode/SupplementaryJavaID6.java + - **/test/langtools/tools/javac/unicode/NonasciiDigit.java + - **/test/langtools/tools/javac/unicode/SupplementaryJavaID3.java + - **/test/langtools/tools/javac/parser/8081769/T8081769.java + - **/test/langtools/tools/javac/parser/7157165/T7157165.java + - **/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.java + - **/test/langtools/tools/javac/parser/MissingClosingBrace.java + - **/test/langtools/tools/javac/parser/T4881269.java + - **/test/langtools/tools/javac/parser/ErroneousParameters.java + - **/test/langtools/tools/javac/failover/FailOver15.java + - **/test/langtools/tools/javac/failover/FailOver01.java + - **/test/langtools/tools/javac/ExtendArray.java + - **/test/langtools/tools/javac/generics/6413682/T6413682.java + - **/test/langtools/tools/javac/annotations/neg/Z13.java + - **/test/langtools/tools/javac/annotations/neg/Z8.java + - **/test/langtools/tools/javac/annotations/neg/NoStatic.java + - **/test/langtools/tools/javac/annotations/neg/Syntax1.java + - **/test/langtools/tools/javac/annotations/neg/Z9.java + - **/test/langtools/tools/javac/annotations/neg/AnnComma.java + - **/test/langtools/tools/javac/annotations/neg/Z3.java + - **/test/langtools/tools/javac/annotations/neg/Z2.java + - **/test/langtools/tools/javac/annotations/neg/Z14.java + - **/test/langtools/tools/javac/annotations/neg/Z5.java + - **/test/langtools/tools/javac/annotations/neg/NoDefault.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/OldArray.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/IndexArray.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedMethodSelectorTest.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/DotClass.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/target/IncompleteArray.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedClassExpr.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/AnnotatedImport.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/StaticFields.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java + - **/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.java + - **/test/langtools/tools/javac/BadAnnotation.java + - **/test/langtools/tools/javac/ExtraneousEquals.java + - **/test/langtools/tools/javac/ImportUnnamed/foo/A.java + - **/test/langtools/tools/javac/processing/6994946/SyntaxErrorTest.java + - **/test/langtools/tools/javac/processing/errors/TestParseErrors/ParseErrors.java + - **/test/langtools/tools/javac/UncaughtOverflow.java + - **/test/langtools/tools/javac/6440583/A.java + - **/test/langtools/tools/javac/EOI.java + - **/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java + - **/test/langtools/tools/javac/SwitchScope.java + - **/test/langtools/tools/javac/incompleteStatements/T8000484.java + - **/test/langtools/tools/javac/quid/T6999438.java + - **/test/langtools/tools/javac/T8175198/AnnotationsAndFormalParamsTest.java + - **/test/langtools/tools/javac/Parens3.java + - **/test/langtools/tools/javac/T8185983/RejectTypeArgsOnSelectTest.java + - **/test/langtools/tools/javac/TryWithResources/TwrForVariable2.java + - **/test/langtools/tools/javac/TryWithResources/ResDeclOutsideTry.java + - **/test/langtools/tools/javac/TryWithResources/PlainTry.java + - **/test/langtools/tools/javac/TryWithResources/BadTwrSyntax.java + - **/test/langtools/tools/javac/enum/EnumMembersOrder.java + - **/test/langtools/tools/javac/enum/EnumAsIdentifier.java + - **/test/langtools/tools/javac/rawDiags/Error.java + - **/test/langtools/tools/javac/8245153/T8245153.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/switchextra/SwitchStatementBroken2.java + - **/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java + - **/test/langtools/tools/javac/Digits.java + - **/test/langtools/tools/javac/LabeledDeclaration.java + - **/test/langtools/tools/javac/DefiniteAssignment/ConstantInfiniteWhile.java + - **/test/langtools/tools/javac/BadHexConstant.java + - **/test/langtools/tools/javac/diags/examples/IllegalStartOfExpr.java + - **/test/langtools/tools/javac/diags/examples/RecordsCantDeclareComponentModifiers.java + - **/test/langtools/tools/javac/diags/examples/TryWithoutCatchOrFinallyOrResource.java + - **/test/langtools/tools/javac/diags/examples/RecordsComponentsCanNotDeclareCStyleArrays.java + - **/test/langtools/tools/javac/diags/examples/ExpectedModule.java + - **/test/langtools/tools/javac/diags/examples/EnumAsIdentifier2.java + - **/test/langtools/tools/javac/diags/examples/TextBlockCloseDelimiter.java + - **/test/langtools/tools/javac/diags/examples/IllegalNonAsciiDigit.java + - **/test/langtools/tools/javac/diags/examples/IntNumberTooLarge.java + - **/test/langtools/tools/javac/diags/examples/VarargsAndReceiver.java + - **/test/langtools/tools/javac/diags/examples/EmptyCharLiteral.java + - **/test/langtools/tools/javac/diags/examples/IncorrectRecordDeclaration.java + - **/test/langtools/tools/javac/diags/examples/PrematureEOF.java + - **/test/langtools/tools/javac/diags/examples/InvalidBinaryNumber.java + - **/test/langtools/tools/javac/diags/examples/InvalidHexNumber.java + - **/test/langtools/tools/javac/diags/examples/CallMustBeFirst.java + - **/test/langtools/tools/javac/diags/examples/ThrowsNotAllowedInAnno.java + - **/test/langtools/tools/javac/diags/examples/IllegalStartOfType.java + - **/test/langtools/tools/javac/diags/examples/TryWithResourcesExprNeedsVar.java + - **/test/langtools/tools/javac/diags/examples/Expected2.java + - **/test/langtools/tools/javac/diags/examples/FinallyWithoutTry.java + - **/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveTypeParams.java + - **/test/langtools/tools/javac/diags/examples/IllegalLineEndInCharLit.java + - **/test/langtools/tools/javac/diags/examples/UnclosedStringLiteral.java + - **/test/langtools/tools/javac/diags/examples/Expected3.java + - **/test/langtools/tools/javac/diags/examples/DefaultAllowedInIntfAnnotationMember.java + - **/test/langtools/tools/javac/diags/examples/AnnotationMustBeNameValue.java + - **/test/langtools/tools/javac/diags/examples/Orphaned.java + - **/test/langtools/tools/javac/diags/examples/ArrayDimMissing.java + - **/test/langtools/tools/javac/diags/examples/NotAllowedClass.java + - **/test/langtools/tools/javac/diags/examples/ExplicitImplicitLambda.java + - **/test/langtools/tools/javac/diags/examples/IntfAnnotationsCantHaveParams.java + - **/test/langtools/tools/javac/diags/examples/ProcessorWrongType/ProcessorWrongType.java + - **/test/langtools/tools/javac/diags/examples/ForeachBadInitialization.java + - **/test/langtools/tools/javac/diags/examples/EnumConstantNotExpected.java + - **/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java + - **/test/langtools/tools/javac/diags/examples/IllegalEscapeChar.java + - **/test/langtools/tools/javac/diags/examples/IllegalChar.java + - **/test/langtools/tools/javac/diags/examples/VarargsMustBeLast.java + - **/test/langtools/tools/javac/diags/examples/IllegalDot.java + - **/test/langtools/tools/javac/diags/examples/IllegalUnderscore.java + - **/test/langtools/tools/javac/diags/examples/NotAllowedVariable.java + - **/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java + - **/test/langtools/tools/javac/diags/examples/UnclosedCharLiteral.java + - **/test/langtools/tools/javac/diags/examples/AssertAsIdentifier2.java + - **/test/langtools/tools/javac/diags/examples/ThisAsIdentifier.java + - **/test/langtools/tools/javac/diags/examples/ModuleDeclSbInModuleInfoJava.java + - **/test/langtools/tools/javac/diags/examples/DotClassExpected.java + - **/test/langtools/tools/javac/diags/examples/CantExtendIntfAnno.java + - **/test/langtools/tools/javac/diags/examples/IntfAnnotationCantHaveTypeParams.java + - **/test/langtools/tools/javac/diags/examples/CatchWithoutTry.java + - **/test/langtools/tools/javac/diags/examples/MalformedFpLit.java + - **/test/langtools/tools/javac/diags/examples/IdentifierExpected.java + - **/test/langtools/tools/javac/diags/examples/InitializerNotAllowed.java + - **/test/langtools/tools/javac/diags/examples/IllegalArrayCreation.java + - **/test/langtools/tools/javac/diags/examples/VarAllOrNothing.java + - **/test/langtools/tools/javac/diags/examples/UnclosedComment.java + - **/test/langtools/tools/javac/diags/examples/EnumConstantExpected.java + - **/test/langtools/tools/javac/diags/examples/IllegalStartOfStmt.java + - **/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java + - **/test/langtools/tools/javac/diags/examples/CannotCreateArrayWithTypeArgs.java + - **/test/langtools/tools/javac/diags/examples/IllegalAnnotationDeclaration.java + - **/test/langtools/tools/javac/diags/examples/ElseWithoutIf.java + - **/test/langtools/tools/javac/api/T6265137a.java + - **/test/langtools/tools/javac/api/TestGetElementReferenceDataWithErrors.java + - **/test/langtools/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java + - **/test/langtools/tools/javac/IllegalAnnotation.java + - **/test/langtools/tools/javac/T6882235.java + - **/test/langtools/tools/javac/QualifiedAccess/QualifiedAccess_4.java + - **/test/langtools/tools/javac/policy/test3/A.java + - **/test/langtools/tools/javac/patterns/PatternCaseErrorRecovery.java + - **/test/langtools/tools/javac/patterns/NoModifiersOnBinding.java + - **/test/langtools/tools/javac/literals/BadBinaryLiterals.java + - **/test/langtools/tools/javac/literals/BadUnderscoreLiterals.java + - **/test/langtools/tools/javac/literals/T6891079.java + - **/test/langtools/tools/javac/T4994049/T4994049.java + - **/test/langtools/jdk/javadoc/doclet/testSourceTab/SingleTab/C.java + - **/test/langtools/jdk/javadoc/doclet/testSourceTab/DoubleTab/C.java + - **/test/langtools/jdk/javadoc/doclet/testUnnamedPackage/src1/BadSource.java + - **/test/langtools/jdk/javadoc/tool/6964914/Error.java + - **/test/langtools/jdk/javadoc/tool/T4994049/FileWithTabs.java + - **/test/langtools/tools/javac/annotations/neg/pkg/package-info.java + +guava: + type: git + url: https://github.com/google/guava.git + commit_id: v28.2 + enabled: true + +spotbugs: + type: git + url: https://github.com/spotbugs/spotbugs.git + commit_id: 3.1.2 + enabled: false + +pmd: + type: git + url: https://github.com/pmd/pmd.git + commit_id: pmd_releases/6.21.0 + exclude_folders: + - **/pmd/pmd-java/src/test/**/* + - **/pmd/cpd/files/* + enabled: false + +spoon: + type: git + url: https://github.com/INRIA/spoon.git + commit_id: spoon-core-10.1.0 + enabled: false + exclude_folders: + - **/src/test/resources/**/* + +lombok-ast: + type: git + url: https://github.com/rzwitserloot/lombok.ast.git + commit_id: v0.2 + enabled: false + exclude_folders: + - **/lombok-ast/test/**/* + +spring-framework: + type: git + url: https://github.com/spring-projects/spring-framework.git + commit_id: v4.1.6.RELEASE + enabled: false + +hibernate-orm: + type: git + url: https://github.com/hibernate/hibernate-orm.git + commit_id: 4.2.19.Final + enabled: false + exclude_folders: + - **/hibernate-orm/documentation/**/* + +elasticsearch: + type: git + url: https://github.com/elastic/elasticsearch.git + commit_id: v1.5.2 + enabled: false + +java-design-patterns: + type: git + url: https://github.com/iluwatar/java-design-patterns.git + commit_id: dd855a376bc025aa61f6816584f79eb9854fe5d7 + enabled: false + +MaterialDesignLibrary: + type: git + url: https://github.com/navasmdc/MaterialDesignLibrary.git + commit_id: 1.3 + enabled: false + +Hbase: + type: git + url: https://github.com/apache/hbase.git + commit_id: 1.1.0.1 + enabled: false + +Orekit: + type: git + url: https://github.com/CS-SI/Orekit.git + commit_id: 8.0.1 + enabled: false + +# Those projects are quite old and have lot of legacy code +apache-ant: + type: git + url: https://github.com/apache/ant.git + commit_id: ANT_194 + enabled: false + exclude_folders: + - **/apache-ant/src/tests/**/* + - **/apache-ant/src/etc/testcases/ + +apache-jsecurity: + type: git + url: https://github.com/apache/jsecurity.git + commit_id: c2ac5b90a467aedb04b52ae50a99e83207d847b3 + enabled: false + +android-launcher: + type: git + url: https://github.com/android/platform_packages_apps_launcher.git + commit_id: android-2.1_r2.1p2 + enabled: false + +apache-struts: + type: git + url: https://github.com/apache/struts.git + commit_id: master + enabled: false + exclude_folders: + - **/apache-struts/**/resources/**/* + +# Projects which contain a lot of labmda expressions +infinispan: + type: git + url: https://github.com/infinispan/infinispan.git + commit_id: 7.2.5.Final + enabled: false + +protonpack: + type: git + url: https://github.com/poetix/protonpack.git + commit_id: protonpack-1.7 + enabled: false + +jOOL: + type: git + url: https://github.com/jOOQ/jOOL.git + commit_id: version-0.9.7 + enabled: false + +RxJava: + type: git + url: https://github.com/ReactiveX/RxJava.git + commit_id: v1.0.9 + enabled: false + +Vavr: + type: git + url: https://github.com/vavr-io/vavr.git + commit_id: v0.9.0 + enabled: false + +# Few projects with excludes to decrease a number of checked files (usefull for some checks which specify overly strong code style policy) +checkstyle-with-excludes: + type: git + url: https://github.com/checkstyle/checkstyle.git + commit_id: master + enabled: false + exclude_folders: + - **/checkstyle-with-excludes/src/test/**/* + - **/checkstyle-with-excludes/src/it/resources/**/* + - **/resources-noncompilable/**/* + +sevntu-checkstyle-with-excludes: + type: git + url: https://github.com/sevntu-checkstyle/sevntu.checkstyle.git + commit_id: master + enabled: false + exclude_folders: + - **/sevntu-checkstyle-with-excludes/sevntu-checks/src/test/**/* + +spotbugs-with-excldues: + type: git + url: https://github.com/spotbugs/spotbugs.git + commit_id: 3.1.2 + enabled: false + exclude_folders: + - **/spotbugs-with-excldues/eclipsePlugin-test/**/* + - **/spotbugs-with-excldues/spotbugsTestCases/**/* + - **/spotbugs-with-excldues/JSR305-testCases/**/* + +hibernate-orm-with-excludes: + type: git + url: https://github.com/hibernate/hibernate-orm.git + commit_id: 4.2.19.Final + enabled: false + exclude_folders: + - **/hibernate-orm-with-excludes/documentation/**/* + - **/hibernate-orm-with-excludes/**/src/test/**/* + +# Guava with excldues to generate reports only for those files which are not excluded in Guava's pom.xml for checkstyle-maven-plugin +# See https://github.com/checkstyle/checkstyle/wiki/How-to-generate-Checkstyle-report-for-Google-Guava-project +guava-mvnstyle: + type: git + url: https://github.com/google/guava.git + commit_id: v28.2 + enabled: false + exclude_folders: + - **/guava-mvnstyle/**/test/**/* + - **/guava-mvnstyle/guava-gwt/src-super/**/* + - **/guava-mvnstyle/guava-gwt/test-super/**/* + - **/guava-mvnstyle/guava-tests/**/* + +# custom javadoc tags +nbia-dcm4che-tools: + type: git + url: https://github.com/thprakash/nbia-dcm4che-tools.git + commit_id: c3591e6f0f84827586db25abded6708e5386ef1a + enabled: false + +# RequireThis usage +spring-integration: + type: git + url: https://github.com/spring-projects/spring-integration.git + commit_id: origin/main + enabled: false + +local-checkstyle: + type: local + url: ../../../ + commit_id: master + enabled: false + exclude_folders: + - **/.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 + - **/resources-noncompilable/**/javaparser/InputJavaParser.java + - **/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java + - **/target/test-classes/**/* + - **/resources-noncompilable/**/treewalker/**/* diff --git a/checkstyle-tester/sevntu_launch_diff.sh b/checkstyle-tester/sevntu_launch_diff.sh index 59627950..54fa25c3 100755 --- a/checkstyle-tester/sevntu_launch_diff.sh +++ b/checkstyle-tester/sevntu_launch_diff.sh @@ -127,23 +127,23 @@ function launch { while read line ; do [[ "$line" == \#* ]] && continue # Skip lines with comments [[ -z "$line" ]] && continue # Skip empty lines - + REPO_NAME=`echo $line | cut -d '|' -f 1` REPO_TYPE=`echo $line | cut -d '|' -f 2` REPO_URL=` echo $line | cut -d '|' -f 3` COMMIT_ID=`echo $line | cut -d '|' -f 4` EXCLUDES=` echo $line | cut -d '|' -f 5` - + echo "Running Launch on $REPO_NAME ..." - + if [ ! -d "$REPOSITORIES_DIR" ]; then mkdir $REPOSITORIES_DIR fi CURRENT_REPO_DIR="" - + if [ "$REPO_TYPE" == "git" ]; then GITPATH=$REPOSITORIES_DIR/$REPO_NAME - + if [ ! -d "$GITPATH" ]; then echo "Cloning $REPO_TYPE repository '${REPO_NAME}' ..." git clone $REPO_URL $GITPATH @@ -213,7 +213,7 @@ function launch { fi echo "Running Launch on $REPO_NAME - completed" - done < $TESTER_DIR/projects-to-test-on.properties + done < $TESTER_DIR/projects-to-test-on.yml } function containsElement { @@ -380,11 +380,11 @@ if $RUN_REPORTS ; then while read line ; do [[ "$line" == \#* ]] && continue # Skip lines with comments [[ -z "$line" ]] && continue # Skip empty lines - + REPO_NAME=`echo $line | cut -d '|' -f 1` EXTPROJECTS+=($REPO_NAME) - done < $TESTER_DIR/projects-to-test-on.properties + done < $TESTER_DIR/projects-to-test-on.yml fi echo "Starting all Reports" diff --git a/patch-diff-report-tool/README.md b/patch-diff-report-tool/README.md index bb188a90..a5cf3e00 100644 --- a/patch-diff-report-tool/README.md +++ b/patch-diff-report-tool/README.md @@ -18,9 +18,9 @@ You have 2 different checkstyle repos, original (base) and forked (patch), for e 4) go to repo folder and execute in console `mvn clean install` 5) go to `./contribution/checkstyle-tester` directory, uncomment all/required lines - in `projects-to-test-on.properties`, edit `my_check.xml` + in `projects-to-test-on.yml`, edit `my_check.xml` 6) execute `groovy diff.groovy --localGitRepo /home/johndoe/projects/checkstyle --baseBranch i111-my-fix - --patchBranch i111-my-fix-mutation --config config.xml --listOfProjects projects-to-test-on.properties` + --patchBranch i111-my-fix-mutation --config config.xml --listOfProjects projects-to-test-on.yml` 7) copy `checkstyle-result.xml` from `checkstyle-tester/reports/project-name/` to some other location.