diff -Nru checkstyle-7.5.1/.ci/check-only-javadoc-error.sh checkstyle-8.8/.ci/check-only-javadoc-error.sh --- checkstyle-7.5.1/.ci/check-only-javadoc-error.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/check-only-javadoc-error.sh 2017-12-31 17:11:38.000000000 +0000 @@ -0,0 +1,26 @@ +#!/bin/bash + +#This script is used at distelli-manifest.yml +#Run "firefox target/site/checkstyle.html" after completion to review html report + +set -e + +uname -a +mvn --version +mvn -e clean install -Pno-validations +git clone https://github.com/checkstyle/contribution && cd contribution/checkstyle-tester +sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties +sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties +sed -i.'' 's/#nbia-dcm4che-tools/nbia-dcm4che-tools/' projects-to-test-on.properties +sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties +sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties +sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties +./launch.sh -Dcheckstyle.config.location=checks-only-javadoc-error.xml +if grep "Got an exception" target/site/checkstyle.html; then + echo "[ERROR] Exceptions detected" + exit 1 +else + echo "[INFO] Finished without exceptions" + exit 0 +fi + diff -Nru checkstyle-7.5.1/.ci/eclipse-compiler-javac.sh checkstyle-8.8/.ci/eclipse-compiler-javac.sh --- checkstyle-7.5.1/.ci/eclipse-compiler-javac.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/eclipse-compiler-javac.sh 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +if [ -z "$1" ]; then + echo "No parameters supplied!" + echo " The classpath of the project and it's libraries to compile must be supplied." + exit 1 +fi + +ECJ_JAR="ecj-4.7.jar" +ECJ_MAVEN_VERSION="R-4.7-201706120950" +ECJ_PATH=~/.m2/repository/$ECJ_MAVEN_VERSION/$ECJ_JAR + +if [ ! -f $ECJ_PATH ]; then + echo "$ECJ_PATH is not found, downloading ..." + mkdir -p $(dirname "$ECJ_PATH") + wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4/$ECJ_MAVEN_VERSION/$ECJ_JAR -O $ECJ_PATH +fi + +mkdir -p target/classes +mkdir -p target/eclipse + +RESULT_FILE=target/eclipse/report.txt + +echo "Executing eclipse compiler, output is redirected to $RESULT_FILE..." +java -jar $ECJ_PATH -target 1.8 -source 1.8 -cp $1 \ + -nowarn:[./target/generated-sources/antlr] -d target/eclipse-compile \ + -enableJavadoc src/main/java src/test/java target/generated-sources/antlr -properties config/org.eclipse.jdt.core.prefs \ + > $RESULT_FILE 2>&1 | true + +echo "Checking for ERROR|WARNING|INFO in $RESULT_FILE ..." +if [[ $(grep -E "ERROR|WARNING|INFO" $RESULT_FILE | cat | wc -l) > 0 ]]; then + cat $RESULT_FILE + false +fi diff -Nru checkstyle-7.5.1/.ci/fast-forward-merge.sh checkstyle-8.8/.ci/fast-forward-merge.sh --- checkstyle-7.5.1/.ci/fast-forward-merge.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/fast-forward-merge.sh 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# GitHub does not support fast-forward merge. +# This script is intended to simplify merge of Pull Requests to keep history linear (fast-forwarded) +# All Pull Requests from GitHub to our project has to be applied to our code by this script. + +set -e + +if [ $# -eq 0 ] + then + echo "$(basename "$0") FORK_USER_NAME USER_BRANCH +example: + + ./$(basename "$0") konstantinos issue73 +" + exit 0; +fi + +GIT_REPO=checkstyle +FORK_USER_NAME=$1 +USER_BRANCH=$2 +REPO=${FORK_USER_NAME}-fork +LOCAL_USER_BRANCH=${FORK_USER_NAME}-${USER_BRANCH} + +echo "removing remote ${REPO} if present ..." +git remote rm ${REPO} | true + +echo "adding remote ..." +git remote add ${REPO} https://github.com/${FORK_USER_NAME}/${GIT_REPO}.git +git fetch ${REPO} + +echo "removing remote ${LOCAL_USER_BRANCH} if present ..." +git branch -D ${LOCAL_USER_BRANCH} | true + +echo "creating local branch ..." +git checkout -b ${LOCAL_USER_BRANCH} ${REPO}/${USER_BRANCH} + +echo "rebasing over master ..." +git rebase master + +echo "merge to master ..." +git checkout master +git merge ${LOCAL_USER_BRANCH} --ff-only + +echo "removing local branch ..." +git branch -D ${LOCAL_USER_BRANCH} + +echo "removing remote ..." +git remote rm ${REPO} diff -Nru checkstyle-7.5.1/.ci/idea_inspection.bat checkstyle-8.8/.ci/idea_inspection.bat --- checkstyle-7.5.1/.ci/idea_inspection.bat 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/idea_inspection.bat 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,46 @@ +@echo off + +::---------------------------------------------------------------------- +:: IntelliJ IDEA inspections for checkstyle. +:: +:: Example: +:: SET IDEA_PATH=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.1\bin\idea.bat +:: .ci\idea_inspection.bat +::---------------------------------------------------------------------- + +SET PROJECT_DIR=%CD%\ +SET INSPECTIONS_PATH=%CD%\config\intellij-idea-inspections.xml +SET RESULTS_DIR=%CD%\target\inspection-results +SET NOISE_LVL=v1 +SET IDEA_LOCATION= +SET IDEA_PROPERTIES=%CD%\config\intellij-idea-inspections.properties + +::Check IDEA_PATH env variable +IF EXIST %IDEA_PATH% SET ( + SET IDEA_LOCATION=%IDEA_PATH% + goto run +) ELSE ( + echo IDEA_PATH variable not found. +) + +::Try to search in path +FOR /f "delims=" %%i IN ('"where idea.bat"') DO SET IDEA_LOCATION="%%i" +if [%IDEA_LOCATION%] NEQ [] ( + goto run +) ELSE ( + echo IntelliJ IDEA was not found in path. + exit /b +) + +:run +mkdir %RESULTS_DIR% +del %RESULTS_DIR%\*.* /s /q + +mkdir .idea\scopes +copy config\intellij-idea-inspection-scope.xml .idea\scopes + +::Execute compilation of Checkstyle to generate all source files +mvn compile + +::Launch inspections +"%IDEA_LOCATION%" inspect %PROJECT_DIR% %INSPECTIONS_PATH% %RESULTS_DIR% -%NOISE_LVL% diff -Nru checkstyle-7.5.1/.ci/idea_inspection.sh checkstyle-8.8/.ci/idea_inspection.sh --- checkstyle-7.5.1/.ci/idea_inspection.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/idea_inspection.sh 2017-12-31 17:11:38.000000000 +0000 @@ -0,0 +1,54 @@ +#!/bin/bash -e + +################################################# +# IntelliJ IDEA inspections for checkstyle. +# +# Example Mac OS: +# IDEA_PATH="/Applications/IntelliJ IDEA.app/Contents/MacOS/idea" ./.ci/idea_inspection.sh +# +# Example Linux: +# IDEA_PATH=/opt/idea-IC-171.4694.70/bin/idea.sh ./.ci/idea_inspection.sh +################################################# + +PROJECT_DIR=$PWD/ +INSPECTIONS_PATH=$PWD/config/intellij-idea-inspections.xml +RESULTS_DIR=$PWD/target/inspection-results +NOISE_LVL=v1 +# we need to export this variable as it is required for idea.sh script +export IDEA_PROPERTIES=$PWD/config/intellij-idea-inspections.properties + +# Check IDEA_PATH env variable +if [[ -z $IDEA_PATH ]]; then + echo "IDEA_PATH variable not found." + # Try to search in path + IDEA_PATH="$(which idea)" + if [ -z $IDEA_PATH ]; then + echo "IntelliJ IDEA was not found in path." + exit -1 + fi +fi + +#Execute compilation of Checkstyle to generate all source files +mvn -e compile + +mkdir -p $RESULTS_DIR +rm -rf $RESULTS_DIR/* + +echo "Intellij Idea validation is about to start" +echo "Progress output will be flushed at end. Validation is in progress ..." +IDEA_OUTPUT=`exec "$IDEA_PATH" inspect $PROJECT_DIR $INSPECTIONS_PATH $RESULTS_DIR -$NOISE_LVL` +echo $IDEA_OUTPUT + +if [[ $IDEA_OUTPUT == "Already running" ]]; then + echo "It might be that Intellij Idea is running, please close it." + exit 1; +fi + +echo "Checking results ..." +if [[ $(grep -R " 0 ]]; then + echo "There are inspection problems. Review results at $RESULTS_DIR folder. Files:" + grep -Rl " response.json + +OUTPUT="$(cat response.json | jq '.total')" + +#print number of found issues +if [ ! "$OUTPUT" -eq "0" ]; then + jq '.' response.json + echo "Found issues - $OUTPUT" +fi diff -Nru checkstyle-7.5.1/.ci/sonar-wrapper.sh checkstyle-8.8/.ci/sonar-wrapper.sh --- checkstyle-7.5.1/.ci/sonar-wrapper.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/sonar-wrapper.sh 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,18 @@ +#!/bin/sh + +#This file is for manual execution only + +set -e + +echo "Building docker image" +docker pull sonarqube +echo "Running docker container" +docker run -dit -p 9000:9000 --name sonar sonarqube:latest +echo "sleeping 60 sec to let sonar start up" +sleep "60" + +./.ci/sonar.sh + +#kill container +docker stop sonar +docker rm sonar diff -Nru checkstyle-7.5.1/.ci/travis/checkchmod.sh checkstyle-8.8/.ci/travis/checkchmod.sh --- checkstyle-7.5.1/.ci/travis/checkchmod.sh 2017-01-07 15:01:41.000000000 +0000 +++ checkstyle-8.8/.ci/travis/checkchmod.sh 2017-10-26 12:59:58.000000000 +0000 @@ -2,13 +2,25 @@ set -e -# On Travis, after cloe all files are with 644 permission, on local they are 664, so we check only executable bit +# On Travis, after clone, all files are with 644 permission, on local they are 664, so we check only executable bit CHMOD=$(find -type f -not -path '*/\.git/*' -a -type f -not -name '*.sh' -a \( -type d -not -perm 775 -o -type f -executable \)) if [[ ! -z $CHMOD ]]; then echo "Expected mode for non '.sh' files is 664."; echo "Files that violates this rule:" for NAMEFILE in $CHMOD do + echo $NAMEFILE; + done + exit 1; +fi + +# On Travis, after clone, all 'sh' files have executable bit +CHMOD=$(find -type f -not -path '*/\.git/*' -a -type f -name '*.sh' -a -not -executable) +if [[ ! -z $CHMOD ]]; then + echo "Expected mode for '.sh' files is 755."; + echo "Files that violates this rule:" + for NAMEFILE in $CHMOD + do echo $NAMEFILE; done exit 1; diff -Nru checkstyle-7.5.1/.ci/travis/travis.sh checkstyle-8.8/.ci/travis/travis.sh --- checkstyle-7.5.1/.ci/travis/travis.sh 2017-02-04 14:02:47.000000000 +0000 +++ checkstyle-8.8/.ci/travis/travis.sh 2017-12-31 17:11:38.000000000 +0000 @@ -5,18 +5,37 @@ case $1 in nondex) - # exclude ConfigurationLoaderTest till https://github.com/TestingResearchIllinois/NonDex/issues/112 - mvn --fail-never clean nondex:nondex -Dtest='*,!ConfigurationLoaderTest' + mvn -e --fail-never clean nondex:nondex -DargLine='-Xms1024m -Xmx2048m' cat `grep -RlE 'td class=.x' .nondex/ | cat` < /dev/null > output.txt RESULT=$(cat output.txt | wc -c) cat output.txt echo 'Size of output:'$RESULT - if [[ $RESULT != 0 ]]; then false; fi + if [[ $RESULT != 0 ]]; then sleep 5s; false; fi + ;; + +versions) + if [[ -v TRAVIS_EVENT_TYPE && $TRAVIS_EVENT_TYPE != "cron" ]]; then exit 0; fi + mvn -e clean versions:dependency-updates-report versions:plugin-updates-report + if [ $(grep "" target/*-updates-report.xml | cat | wc -l) -gt 0 ]; then + echo "Version reports (dependency-updates-report.xml):" + cat target/dependency-updates-report.xml + echo "Version reports (plugin-updates-report.xml):" + cat target/plugin-updates-report.xml + echo "New dependency versions:" + grep -B 7 -A 7 "" target/dependency-updates-report.xml | cat + echo "New plugin versions:" + grep -B 4 -A 7 "" target/plugin-updates-report.xml | cat + echo "Verification is failed." + sleep 5s + false + else + echo "No new versions found" + fi ;; assembly-run-all-jar) - mvn clean package -Passembly - CS_POM_VERSION=$(mvn -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + mvn -e clean package -Passembly + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) echo version:$CS_POM_VERSION java -jar target/checkstyle-$CS_POM_VERSION-all.jar -c /google_checks.xml \ src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/InputNoLineWrapGood.java > output.log @@ -25,9 +44,13 @@ ;; sonarqube) - if [[ $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi - mvn clean package cobertura:cobertura sonar:sonar \ - -Dsonar.host.url=https://sonarqube.com \ + # token could be generated at https://sonarcloud.io/account/security/ + # executon on local: SONAR_TOKEN=xxxxxxxxxx ./.ci/travis/travis.sh sonarqube + if [[ -v TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi + if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi + export MAVEN_OPTS='-Xmx2000m' + mvn -e clean package cobertura:cobertura sonar:sonar \ + -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.login=$SONAR_TOKEN \ -Dcobertura.report.format=xml -Dmaven.test.failure.ignore=true \ -Dcheckstyle.skip=true -Dpmd.skip=true -Dcheckstyle.ant.skip=true @@ -35,7 +58,7 @@ release-dry-run) if [ $(git log -1 | grep -E "\[maven-release-plugin\] prepare release" | cat | wc -l) -lt 1 ]; then - mvn release:prepare -DdryRun=true --batch-mode -Darguments='-DskipTests -DskipITs \ + mvn -e release:prepare -DdryRun=true --batch-mode -Darguments='-DskipTests -DskipITs \ -Dcobertura.skip=true -Dpmd.skip=true -Dfindbugs.skip=true -Dxml.skip=true \ -Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true -Dgpg.skip=true' fi @@ -56,124 +79,184 @@ all-sevntu-checks) xmlstarlet sel --net --template -m .//module -v "@name" -n config/checkstyle_sevntu_checks.xml \ | grep -vE "Checker|TreeWalker|Filter|Holder" | grep -v "^$" \ + | sed "s/com\.github\.sevntu\.checkstyle\.checks\..*\.//" \ | sort | uniq | sed "s/Check$//" > file.txt - wget -q http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html -O - | html2text \ - | grep -E "Check$" | cut -d " " -f6 \ + wget -q http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/allclasses-frame.html -O - \ + | grep "
  • " | cut -d '>' -f 3 | sed "s/<\/a//" \ + | grep -E "Check$" \ | sort | uniq | sed "s/Check$//" > web.txt diff -u web.txt file.txt ;; +no-error-test-sbe) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo version:$CS_POM_VERSION + mvn -e clean install -Pno-validations + git clone https://github.com/real-logic/simple-binary-encoding.git + cd simple-binary-encoding + git checkout 963814f8ca1456de9daaf67e78663e7d877871a9 + sed -i'' "s/'com.puppycrawl.tools:checkstyle:.*'/'com.puppycrawl.tools:checkstyle:$CS_POM_VERSION'/" build.gradle + ./gradlew build + ;; + no-exception-test-checkstyle-sevntu-checkstyle) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#checkstyle/checkstyle/' projects-for-travis.properties - sed -i.'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#checkstyle/checkstyle/' projects-to-test-on.properties + sed -i.'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-guava) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#guava/guava/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#guava|/guava|/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-guava-with-google-checks) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#guava/guava/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#guava|/guava|/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations sed -i.'' 's/warning/ignore/' src/main/resources/google_checks.xml cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg ../../src/main/resources/google_checks.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config ../../src/main/resources/google_checks.xml ;; no-exception-test-hibernate) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-findbugs) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#findbugs/findbugs/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-spring-framework) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#spring-framework/spring-framework/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-hbase) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#Hbase/Hbase/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#Hbase/Hbase/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-Pmd-elasticsearch-lombok-ast) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#pmd/pmd/' projects-for-travis.properties - sed -i.'' 's/#elasticsearch/elasticsearch/' projects-for-travis.properties - sed -i.'' 's/#lombok-ast/lombok-ast/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties + sed -i.'' 's/#elasticsearch/elasticsearch/' projects-to-test-on.properties + sed -i.'' 's/#lombok-ast/lombok-ast/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml ;; no-exception-test-alot-of-project1) git clone https://github.com/checkstyle/contribution cd contribution/checkstyle-tester - sed -i.'' 's/^guava/#guava/' projects-for-travis.properties - sed -i.'' 's/#RxJava/RxJava/' projects-for-travis.properties - sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-for-travis.properties - sed -i.'' 's/#MaterialDesignLibrary/MaterialDesignLibrary/' projects-for-travis.properties - sed -i.'' 's/#apache-ant/apache-ant/' projects-for-travis.properties - sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-for-travis.properties - sed -i.'' 's/#android-launcher/android-launcher/' projects-for-travis.properties + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#RxJava/RxJava/' projects-to-test-on.properties + sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-to-test-on.properties + sed -i.'' 's/#MaterialDesignLibrary/MaterialDesignLibrary/' projects-to-test-on.properties + sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties + sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-to-test-on.properties + sed -i.'' 's/#android-launcher/android-launcher/' projects-to-test-on.properties cd ../../ - mvn clean install -Pno-validations + mvn -e clean install -Pno-validations cd contribution/checkstyle-tester - groovy ./launch.groovy --listOfProjects projects-for-travis.properties --checkstyleCfg checks-nonjavadoc-error.xml + export MAVEN_OPTS="-Xmx2048m" + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + ;; + +cobertura-check) + set +e + echo "Output and Error output will be redirected to mvn-log.log file ..." + mvn -e clean compile cobertura:cobertura cobertura:check -DargLine='-Xms1024m -Xmx2048m' &> mvn-log.log + echo "Printing mvn-log.log file:" + cat mvn-log.log + sleep 5s + set -e + echo "Grep for hidden errors (due to quiet=true mode in pom.xml):" + grep -R " mvn-log-grep.log + cat mvn-log-grep.log + if [[ $(cat mvn-log-grep.log | wc -l) -gt 0 ]]; then + sleep 5s + false + fi + echo "Checking that all classes are covered:" + xmlstarlet sel -t -m "//class" -v "@name" -n target/site/cobertura/coverage.xml | sed "s/\./\//g" | sed "/^$/d" | sort | uniq > cobertura_classes.log + find target/classes -type f -name "*.class" | grep -vE ".*\\$.*" | sed "s/target\/classes\///g" | sed "s/.class//g" | sed "/^$/d" | sort | uniq > target_classes.log + xmlstarlet sel -N pom=http://maven.apache.org/POM/4.0.0 -t -m "//pom:instrumentation/pom:excludes" -v "pom:exclude" -n pom.xml | sed "s/*//g" | sed "s/.class//g" | sed "/^$/d" | sort | uniq > cobertura_excluded_classes.log + # xmlstarlet has an issue. It concatenates this line with the previous one and removes new line character, + # so we need to split them apart. We use the command till update of xmlstarlet to higher version. + sed -i'' "s/com\/puppycrawl\/tools\/checkstyle\/gui\/BaseCellEditor/\ncom\/puppycrawl\/tools\/checkstyle\/gui\/BaseCellEditor/" cobertura_excluded_classes.log + grep -Fxvf cobertura_classes.log target_classes.log > missed_classes_with_excludes.log + grep -Fvf cobertura_excluded_classes.log missed_classes_with_excludes.log > missed_classes_without_excludes.log | cat > output.log + echo "output.log content:" + cat output.log + + if [[ -s missed_classes_without_excludes.log ]] ; then + echo "Classes which are missed in Cobertura coverage report:" + cat missed_classes_without_excludes.log + sleep 5s + false + else + echo "All classes are present in Cobertura coverage report." + fi ;; *) - echo "Unexpected GOAL mode: $GOAL" - exit 1 + echo "Unexpected argument: $1" + sleep 5s + false ;; esac diff -Nru checkstyle-7.5.1/.ci/travis/xtr_pr-description.sh checkstyle-8.8/.ci/travis/xtr_pr-description.sh --- checkstyle-7.5.1/.ci/travis/xtr_pr-description.sh 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/.ci/travis/xtr_pr-description.sh 2017-09-04 20:01:01.000000000 +0000 @@ -4,26 +4,26 @@ if [[ ! $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi LINK_COMMITS=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST/commits -COMMITS=$(curl -s -H "Authorization: token $GITHUB_AUTH_TOKEN" $LINK_COMMITS | jq '.[0] | .commit.message') -echo 'Messages from github:'${COMMITS:0:60}... +COMMITS=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_COMMITS | jq '.[0] | .commit.message') +echo 'Commit messages from github: '${COMMITS:0:60}... ISSUE_NUMBER=$(echo $COMMITS | sed -e 's/^.*Issue //' | sed -e 's/:.*//') -echo 'Issue number:'$ISSUE_NUMBER && RESULT=0 +echo 'Issue number: '$ISSUE_NUMBER && RESULT=0 if [[ $ISSUE_NUMBER =~ ^#[0-9]+$ ]]; then - LINK_PR=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST + LINK_PR=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST LINK_ISSUE=https://api.github.com/repos/checkstyle/checkstyle/issues/${ISSUE_NUMBER:1} REGEXP=($ISSUE_NUMBER\|https://github.com/checkstyle/checkstyle/issues/${ISSUE_NUMBER:1}) - PR_DESC=$(curl -s -H "Authorization: token $GITHUB_AUTH_TOKEN" $LINK_PR | jq '.body' | grep -E $REGEXP | cat ) - echo 'PR Description grepped:'${PR_DESC:0:80} + PR_DESC=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_PR | jq '.body' | grep -E $REGEXP | cat ) + echo 'PR Description grepped:'${PR_DESC:0:80} if [[ -z $PR_DESC ]]; then - echo 'Please put a reference of Issue to PR description, this will bind Issue and PR in Github' && RESULT=1; + echo 'Please put a reference to an Issue in the PR description, this will bind the Issue to your PR in Github' && RESULT=1; fi - LABEL_APRV=$(curl -s -H "Authorization: token $GITHUB_AUTH_TOKEN" $LINK_ISSUE | jq '.labels [] | .name' | grep approved | cat | wc -l ) + LABEL_APRV=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_ISSUE | jq '.labels [] | .name' | grep approved | cat | wc -l ) if [[ $LABEL_APRV == 0 ]]; then - echo 'You provide PR to Issue that is not approved yes, please ask admins to approve your issue first' && RESULT=1; + echo 'You are providing a PR for an Issue that is not approved yet, please ask admins to approve your Issue first' && RESULT=1; fi fi if [[ $RESULT == 0 ]]; then - echo 'PR validation succeed.'; + echo 'PR validation succeeded.'; else echo 'PR validation failed.' && false; fi diff -Nru checkstyle-7.5.1/.ci/travis/xtr_releasenotes-gen.sh checkstyle-8.8/.ci/travis/xtr_releasenotes-gen.sh --- checkstyle-7.5.1/.ci/travis/xtr_releasenotes-gen.sh 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/.ci/travis/xtr_releasenotes-gen.sh 2017-12-31 17:11:38.000000000 +0000 @@ -5,36 +5,47 @@ if [[ $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi git clone https://github.com/checkstyle/contribution cd contribution/releasenotes-builder -mvn clean compile package +mvn -e clean compile package cd ../../ +# we need to do full clone as Travis do "git clone --depth=50" git clone https://github.com/checkstyle/checkstyle cd checkstyle LATEST_RELEASE_TAG=$(git describe $(git rev-list --tags --max-count=1)) cd ../ -CS_RELEASE_VERSION=$(mvn -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | sed 's/-SNAPSHOT//' ) +CS_RELEASE_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | sed 's/-SNAPSHOT//' ) echo LATEST_RELEASE_TAG=$LATEST_RELEASE_TAG echo CS_RELEASE_VERSION=$CS_RELEASE_VERSION java -jar contribution/releasenotes-builder/target/releasenotes-builder-1.0-all.jar \ -localRepoPath checkstyle -startRef $LATEST_RELEASE_TAG -releaseNumber $CS_RELEASE_VERSION \ - -githubAuthToken $GITHUB_AUTH_TOKEN -generateAll -publishXdoc + -githubAuthToken $READ_ONLY_TOKEN -generateAll -publishXdoc echo ============================================== -echo xdoc echo +echo "xdoc segment:" +echo ============================================== cat xdoc.xml -echo twitter post +echo ============================================== echo +echo "twitter post:" +echo ============================================== cat twitter.txt -echo google plus post +echo ============================================== echo +echo "google plus post:" +echo ============================================== cat gplus.txt -echo RSS post +echo ============================================== echo +echo "RSS post:" +echo ============================================== cat rss.txt -echo mailing list post +echo ============================================== echo +echo "mailing list post:" +echo ============================================== cat mailing_list.txt +echo ============================================== cd checkstyle/src/xdocs -echo releasenotes.xml after commit echo +echo "releasenotes.xml after commit:" head -n 100 releasenotes.xml diff -Nru checkstyle-7.5.1/.ci/wercker.sh checkstyle-8.8/.ci/wercker.sh --- checkstyle-7.5.1/.ci/wercker.sh 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/.ci/wercker.sh 2018-01-22 14:58:53.000000000 +0000 @@ -0,0 +1,202 @@ +#!/bin/bash +# Attention, there is no "-x" to avoid problems on Wercker +set -e + +case $1 in + +no-error-pgjdbc) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/pgjdbc/pgjdbc.git && break || sleep 15; done + cd pgjdbc/pgjdbc + mvn -e checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION} + cd ../../ + rm -rf pgjdbc + ;; + +no-error-orekit) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/Hipparchus-Math/hipparchus.git && break || sleep 15; done + cd hipparchus + git checkout 905006092493e350dcd68dd7b2ec1dedaf4983b7 + mvn -e clean install -DskipTests + cd ../ + for i in 1 2 3 4 5; do git clone https://github.com/CS-SI/Orekit.git && break || sleep 15; done + cd Orekit + # Orekit use 'develop' branch as target for PullRequest merges + git checkout develop + mvn -e compile checkstyle:check -Dorekit.checkstyle.version=${CS_POM_VERSION} + cd ../ + rm -rf hipparchus Orekit + ;; + +no-error-xwiki) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/xwiki/xwiki-commons/ && break || sleep 15; done + cd xwiki-commons + git checkout 44b0c0048c516dae20cf5f8a71181af836549484 + mvn -e install -DskipTests -Dxwiki.clirr.skip=true checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION} + cd ../../ + rm -rf xwiki-commons + ;; + +no-error-apex-core) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/apache/incubator-apex-core/ && break || sleep 15; done + cd incubator-apex-core + mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION} + cd ../ + rm -rf incubator-apex-core + ;; + +no-error-hibernate-search) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/hibernate/hibernate-search.git && break || sleep 15; done + cd hibernate-search + mvn -e -s settings-example.xml clean install -DskipTests=true -Dtest.elasticsearch.host.provided=true -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION} + mvn -e -s settings-example.xml checkstyle:check -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION} + cd ../ + rm -rf hibernate-search + ;; + +no-error-htmlunit) + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + echo "checkouting project sources ..." + svn -q export https://svn.code.sf.net/p/htmlunit/code/trunk/htmlunit@r14923 htmlunit + cd htmlunit + sed -i "s/ 2.28-SNAPSHOT/ 2.28-20171106.080245-12/" pom.xml + echo "Running checkstyle validation ..." + mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION} + cd ../ + rm -rf htmlunit + ;; + +no-error-checkstyles-sevntu) + set -e + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + mvn -e compile verify -Dmaven.sevntu-checkstyle-check.checkstyle.version=${CS_POM_VERSION} -Dmaven.test.skip=true -Dcheckstyle.ant.skip=true -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true -Dforbiddenapis.skip=true -Dxml.skip=true + ;; + +no-error-sevntu-checks) + set -e + CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo CS_version: ${CS_POM_VERSION} + for i in 1 2 3 4 5; do git clone https://github.com/sevntu-checkstyle/sevntu.checkstyle && break || sleep 15; done + cd sevntu.checkstyle/sevntu-checks + mvn -e -Pno-validations verify -Dcheckstyle.skip=false -Dcheckstyle.version=${CS_POM_VERSION} -Dcheckstyle.configLocation=../../config/checkstyle_checks.xml + cd ../../ + rm -rf sevntu.checkstyle + ;; + +no-exception-struts) + for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done + cd contribution/checkstyle-tester + sed -i'' 's/^guava/#guava/' projects-for-wercker.properties + sed -i'' 's/#apache-struts/apache-struts/' projects-for-wercker.properties + groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-checkstyle-sevntu) + set -e + for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done + cd contribution/checkstyle-tester + sed -i'' 's/^guava/#guava/' projects-for-wercker.properties + sed -i'' 's/#checkstyle/checkstyle/' projects-for-wercker.properties + sed -i'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-wercker.properties + groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-guava) + for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done + cd contribution/checkstyle-tester + sed -i'' 's/^guava/#guava/' projects-for-wercker.properties + sed -i'' 's/#guava/guava/' projects-for-wercker.properties + groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-hibernate-orm) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-findbugs) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-spring-framework) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-hbase) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#Hbase/Hbase/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-Pmd-elasticsearch-lombok-ast) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties + sed -i.'' 's/#elasticsearch/elasticsearch/' projects-to-test-on.properties + sed -i.'' 's/#lombok-ast/lombok-ast/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +no-exception-alot-of-projects) + git clone https://github.com/checkstyle/contribution + cd contribution/checkstyle-tester + sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties + sed -i.'' 's/#RxJava/RxJava/' projects-to-test-on.properties + sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-to-test-on.properties + sed -i.'' 's/#MaterialDesignLibrary/MaterialDesignLibrary/' projects-to-test-on.properties + sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties + sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-to-test-on.properties + sed -i.'' 's/#android-launcher/android-launcher/' projects-to-test-on.properties + groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml + cd ../../ + rm -rf contribution + ;; + +*) + echo "Unexpected argument: $1" + sleep 5s + false + ;; + +esac diff -Nru checkstyle-7.5.1/circle.yml checkstyle-8.8/circle.yml --- checkstyle-7.5.1/circle.yml 2017-02-04 14:02:47.000000000 +0000 +++ checkstyle-8.8/circle.yml 2017-12-31 17:11:38.000000000 +0000 @@ -7,36 +7,36 @@ pre: - if [ ! -d groovy-2.4.7 ]; then wget https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.7.zip && unzip apache-groovy-binary-2.4.7.zip; fi - # we to override as 'mvn dependecy:go-ofline' does not download all dependencies + # we to override as 'mvn -e dependecy:go-ofline' does not download all dependencies override: - - mvn install -Pno-validations + - mvn -e install -Pno-validations - eval $TESTER_DEPENDENCIES machine: java: version: oraclejdk8 environment: CMD1: "cd contribution/checkstyle-tester" - DEP1: " && sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties" + DEP1: " && sed -i'' 's/^guava/#guava/' projects-to-test-on.properties" # we need this to let pass 'mvn site' on no-projects mode to download all dependecies DEP2: " && echo 'class ClassEmpty{}' > src/main/java/EmptyClass.java" - DEP3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-for-circle.properties --checkstyleCfg my_check.xml" + DEP3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-to-test-on.properties --config my_check.xml" TESTER_DEPENDENCIES: $CMD1$DEP1$DEP2$DEP3 - CMD2: " && sed -i.'' 's/^openjdk/#openjdk/' projects-for-circle.properties" - CMD3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-for-circle.properties --checkstyleCfg checks-nonjavadoc-error.xml" - OPENJDK7: " && sed -i.'' 's/#openjdk7/openjdk7/' projects-for-circle.properties" - OPENJDK8: " && sed -i.'' 's/#openjdk8/openjdk8/' projects-for-circle.properties" - OPENJDK9: " && sed -i.'' 's/#openjdk9/openjdk9/' projects-for-circle.properties" - INFINISPAN: " && sed -i.'' 's/#infinispan/infinispan/' projects-for-circle.properties" - PROTONPACK: " && sed -i.'' 's/#protonpack/protonpack/' projects-for-circle.properties" - JOOL: " && sed -i.'' 's/#jOOL/jOOL/' projects-for-circle.properties" - TAPESTRY: " && sed -i.'' 's/#tapestry5/tapestry5/' projects-for-circle.properties" - COMMONS: " && sed -i.'' 's/#apache-commons/apache-commons/' projects-for-circle.properties" - LUCENE: " && sed -i.'' 's/#lucene-solr/lucene-solr/' projects-for-circle.properties" - STORM: " && sed -i.'' 's/#storm/storm/' projects-for-circle.properties" - HADOOP: " && sed -i.'' 's/#hadoop/hadoop/' projects-for-circle.properties" - CASSANDRA: " && sed -i.'' 's/#cassandra/cassandra/' projects-for-circle.properties" - SCOUTER: " && sed -i.'' 's/#scouter/scouter/' projects-for-circle.properties" - GROOVY: " && sed -i.'' 's/#groovy/groovy/' projects-for-circle.properties" + CMD2: " && sed -i'' 's/^openjdk/#openjdk/' projects-for-circle.properties" + CMD3: " && /home/ubuntu/checkstyle/groovy-2.4.7/bin/groovy launch.groovy --listOfProjects projects-for-circle.properties --config checks-nonjavadoc-error.xml" + OPENJDK7: " && sed -i'' 's/#openjdk7/openjdk7/' projects-for-circle.properties" + OPENJDK8: " && sed -i'' 's/#openjdk8/openjdk8/' projects-for-circle.properties" + OPENJDK9: " && sed -i'' 's/#openjdk9/openjdk9/' projects-for-circle.properties" + INFINISPAN: " && sed -i'' 's/#infinispan/infinispan/' projects-for-circle.properties" + PROTONPACK: " && sed -i'' 's/#protonpack/protonpack/' projects-for-circle.properties" + JOOL: " && sed -i'' 's/#jOOL/jOOL/' projects-for-circle.properties" + TAPESTRY: " && sed -i'' 's/#tapestry-5/tapestry-5/' projects-for-circle.properties" + COMMONS: " && sed -i'' 's/#apache-commons/apache-commons/' projects-for-circle.properties" + LUCENE: " && sed -i'' 's/#lucene-solr/lucene-solr/' projects-for-circle.properties" + STORM: " && sed -i'' 's/#storm/storm/' projects-for-circle.properties" + HADOOP: " && sed -i'' 's/#hadoop/hadoop/' projects-for-circle.properties" + CASSANDRA: " && sed -i'' 's/#cassandra/cassandra/' projects-for-circle.properties" + SCOUTER: " && sed -i'' 's/#scouter/scouter/' projects-for-circle.properties" + GROOVY: " && sed -i'' 's/#groovy/groovy/' projects-for-circle.properties" # Test over openjdk7,8 TEST_1: $CMD1$CMD2$OPENJDK7$OPENJDK8$CMD3 # Test over infinispan, protonpack, jOOL, lucene-solr, openjdk9 @@ -45,7 +45,8 @@ TEST_3: $CMD1$CMD2$TAPESTRY$STORM$CASSANDRA$CMD3 # Test over apache-commons, hadoop, scouter, groovy TEST_4: $CMD1$CMD2$COMMONS$HADOOP$SCOUTER$GROOVY$CMD3 + SKIP_FILES: ".github|appveyor.yml|.travis.yml|.ci|distelli-manifest.yml|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr|shippable.yml|wercker.yml|wercker.sh|intellij-idea-inspections.xml|org.eclipse.jdt.core.prefs" test: override: - - case $CIRCLE_NODE_INDEX in 0) eval $TEST_1 ;; 1) eval $TEST_2 ;; 2) eval $TEST_3 ;; 3) eval $TEST_4 ;; esac: + - if [ $(git diff --name-only HEAD HEAD~1 | grep -vE $SKIP_FILES | wc -c) -gt 0 ] ; then case $CIRCLE_NODE_INDEX in 0) eval $TEST_1 ;; 1) eval $TEST_2 ;; 2) eval $TEST_3 ;; 3) eval $TEST_4 ;; esac; fi: parallel: true diff -Nru checkstyle-7.5.1/config/ant-phase-verify.xml checkstyle-8.8/config/ant-phase-verify.xml --- checkstyle-7.5.1/config/ant-phase-verify.xml 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/config/ant-phase-verify.xml 2017-12-27 15:23:07.000000000 +0000 @@ -18,11 +18,12 @@ - Checkstyle started: ${STARTED} + Checkstyle started (checkstyle_checks.xml): ${STARTED} + + - + - Checkstyle finished: ${FINISHED} + Checkstyle finished (checkstyle_checks.xml) : ${FINISHED} + + + + + Checkstyle started (checkstyle_non_main_files_checks.xml): ${STARTED} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Checkstyle finished (checkstyle_non_main_files_checks.xml): ${FINISHED} + diff -Nru checkstyle-7.5.1/config/catalog.xml checkstyle-8.8/config/catalog.xml --- checkstyle-7.5.1/config/catalog.xml 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/catalog.xml 2017-12-27 15:23:07.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff -Nru checkstyle-7.5.1/config/checkstyle_checks.xml checkstyle-8.8/config/checkstyle_checks.xml --- checkstyle-7.5.1/config/checkstyle_checks.xml 2017-01-29 23:47:31.000000000 +0000 +++ checkstyle-8.8/config/checkstyle_checks.xml 2017-12-30 14:59:46.000000000 +0000 @@ -1,7 +1,7 @@ + "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> @@ -31,7 +31,11 @@ - + + + + + @@ -115,9 +110,9 @@ - + - + @@ -143,13 +138,37 @@ + + + + + + + + + + + + + + + + + + + - + + + + @@ -161,13 +180,26 @@ + + + + + + + + + + + - - - + + + + + @@ -176,6 +208,11 @@ + + + + + @@ -218,13 +255,22 @@ - + + + + + + + + + + - @@ -254,6 +300,7 @@ + @@ -264,6 +311,25 @@ + + + + + + + + + + + + + + + + @@ -275,9 +341,15 @@ + + + + + + @@ -338,7 +410,6 @@ - - + @@ -418,7 +489,7 @@ - + @@ -436,6 +507,7 @@ + @@ -444,10 +516,13 @@ + + + @@ -496,6 +571,7 @@ + diff -Nru checkstyle-7.5.1/config/checkstyle_non_main_files_checks.xml checkstyle-8.8/config/checkstyle_non_main_files_checks.xml --- checkstyle-7.5.1/config/checkstyle_non_main_files_checks.xml 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/checkstyle_non_main_files_checks.xml 2017-09-04 20:01:01.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff -Nru checkstyle-7.5.1/config/checkstyle_non_main_files_suppressions.xml checkstyle-8.8/config/checkstyle_non_main_files_suppressions.xml --- checkstyle-7.5.1/config/checkstyle_non_main_files_suppressions.xml 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/checkstyle_non_main_files_suppressions.xml 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru checkstyle-7.5.1/config/checkstyle_sevntu_checks.xml checkstyle-8.8/config/checkstyle_sevntu_checks.xml --- checkstyle-7.5.1/config/checkstyle_sevntu_checks.xml 2017-01-27 14:29:52.000000000 +0000 +++ checkstyle-8.8/config/checkstyle_sevntu_checks.xml 2017-11-26 14:05:03.000000000 +0000 @@ -2,7 +2,7 @@ + "http://checkstyle.sourceforge.net/dtds/configuration_1_2.dtd"> @@ -14,14 +14,13 @@ - - - - - - + + + + + @@ -34,7 +33,7 @@ - + @@ -88,7 +87,7 @@ - + @@ -126,6 +125,17 @@ + + + + + + @@ -179,16 +189,25 @@ - + + - + + + + + + + + + diff -Nru checkstyle-7.5.1/config/default_sonar_profile.xml checkstyle-8.8/config/default_sonar_profile.xml --- checkstyle-7.5.1/config/default_sonar_profile.xml 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/default_sonar_profile.xml 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,1803 @@ + + + + checksyle-profile + java + + + + + squid + AssignmentInSubExpressionCheck + MAJOR + + + + + + squid + ClassVariableVisibilityCheck + MINOR + + + + + + squid + EmptyStatementUsageCheck + MINOR + + + + squid + ForLoopCounterChangedCheck + MAJOR + + + + squid + HiddenFieldCheck + MAJOR + + + + squid + LabelsShouldNotBeUsedCheck + MAJOR + + + + + + + + + squid + ModifiersOrderCheck + MINOR + + + + squid + ObjectFinalizeCheck + MAJOR + + + + squid + ObjectFinalizeOverridenCallsSuperFinalizeCheck + CRITICAL + + + + squid + ObjectFinalizeOverridenCheck + MAJOR + + + + squid + RedundantThrowsDeclarationCheck + MINOR + + + + squid + S00100 + MINOR + + + format + ^[a-z][a-zA-Z0-9]*$ + + + + + squid + S00101 + MINOR + + + format + ^[A-Z][a-zA-Z0-9]*$ + + + + + + + squid + S00108 + MAJOR + + + + + + squid + S00114 + MINOR + + + format + ^[A-Z][a-zA-Z0-9]*$ + + + + + + + squid + S00116 + MINOR + + + format + ^[a-z][a-zA-Z0-9]*$ + + + + + squid + S00117 + MINOR + + + format + ^[a-z][a-zA-Z0-9]*$ + + + + + squid + S00119 + MINOR + + + format + ^[A-Z][0-9]?$ + + + + + squid + S00120 + MINOR + + + format + ^[a-z]+(\.[a-z][a-z0-9]*)*$ + + + + + + + squid + S1065 + MAJOR + + + + + + squid + S1068 + MAJOR + + + + squid + S1075 + MINOR + + + + squid + S1118 + MAJOR + + + + squid + S1125 + MINOR + + + + squid + S1126 + MINOR + + + + + + + + + + squid + S1141 + MAJOR + + + + squid + S1143 + MAJOR + + + + + + squid + S1149 + MAJOR + + + + squid + S1150 + MAJOR + + + + squid + S1153 + MINOR + + + + squid + S1155 + MINOR + + + + squid + S1157 + MINOR + + + + squid + S1158 + MINOR + + + + squid + S1161 + MAJOR + + + + squid + S1163 + CRITICAL + + + + squid + S1165 + MINOR + + + + squid + S1168 + MAJOR + + + + squid + S1170 + MINOR + + + + squid + S1171 + MAJOR + + + + + + squid + S1174 + CRITICAL + + + + squid + S1175 + CRITICAL + + + + + + squid + S1182 + MINOR + + + + squid + S1185 + MINOR + + + + squid + S1186 + CRITICAL + + + + squid + S1190 + BLOCKER + + + + + + squid + S1192 + CRITICAL + + + threshold + 3 + + + + + squid + S1193 + MAJOR + + + + squid + S1195 + MINOR + + + + squid + S1197 + MINOR + + + + squid + S1199 + MINOR + + + + squid + S1201 + MAJOR + + + + squid + S1206 + MINOR + + + + squid + S1210 + MINOR + + + + squid + S1214 + CRITICAL + + + + squid + S1215 + CRITICAL + + + + squid + S1217 + MAJOR + + + + squid + S1219 + BLOCKER + + + + squid + S1220 + MINOR + + + + squid + S1221 + MAJOR + + + + squid + S1223 + MAJOR + + + + squid + S1226 + MINOR + + + + squid + S1244 + MAJOR + + + + squid + S1264 + MINOR + + + + squid + S128 + BLOCKER + + + + squid + S1301 + MINOR + + + + squid + S1313 + MINOR + + + + squid + S1317 + MAJOR + + + + squid + S1319 + MINOR + + + + squid + S135 + MINOR + + + + squid + S1444 + MINOR + + + + squid + S1450 + MINOR + + + + squid + S1452 + CRITICAL + + + + squid + S1479 + MAJOR + + + maximum + 30 + + + + + squid + S1481 + MINOR + + + + squid + S1488 + MINOR + + + + squid + S1596 + MINOR + + + + squid + S1598 + CRITICAL + + + + + + squid + S1604 + MAJOR + + + + squid + S1607 + MAJOR + + + + squid + S1610 + MINOR + + + + squid + S1611 + MINOR + + + + + + squid + S1640 + MINOR + + + + squid + S1643 + MINOR + + + + squid + S1656 + MAJOR + + + + squid + S1659 + MINOR + + + + squid + S1700 + MAJOR + + + + squid + S1710 + MINOR + + + + squid + S1751 + MAJOR + + + + squid + S1764 + MAJOR + + + + squid + S1844 + MAJOR + + + + + + squid + S1849 + MAJOR + + + + squid + S1854 + MAJOR + + + + squid + S1858 + MINOR + + + + squid + S1860 + MAJOR + + + + squid + S1862 + MAJOR + + + + squid + S1871 + MAJOR + + + + squid + S1872 + MAJOR + + + + squid + S1905 + MINOR + + + + squid + S1940 + MINOR + + + + + + squid + S1989 + MINOR + + + + squid + S1994 + CRITICAL + + + + squid + S2055 + MINOR + + + + squid + S2060 + MAJOR + + + + squid + S2061 + MAJOR + + + + squid + S2062 + CRITICAL + + + + squid + S2065 + MINOR + + + + squid + S2066 + MINOR + + + + squid + S2068 + BLOCKER + + + + squid + S2077 + BLOCKER + + + + squid + S2092 + MINOR + + + + + + squid + S2094 + MINOR + + + + + + squid + S2097 + MINOR + + + + squid + S2109 + MAJOR + + + + squid + S2110 + MAJOR + + + + squid + S2111 + MAJOR + + + + squid + S2112 + MAJOR + + + + squid + S2114 + MAJOR + + + + squid + S2116 + MAJOR + + + + squid + S2118 + MAJOR + + + + squid + S2122 + CRITICAL + + + + squid + S2123 + MAJOR + + + + squid + S2127 + MAJOR + + + + squid + S2129 + MAJOR + + + + squid + S2130 + MINOR + + + + squid + S2131 + MAJOR + + + + squid + S2133 + MAJOR + + + + squid + S2134 + MAJOR + + + + squid + S2140 + MINOR + + + + squid + S2142 + MAJOR + + + + squid + S2147 + MINOR + + + + squid + S2151 + CRITICAL + + + + squid + S2153 + MINOR + + + + squid + S2154 + MAJOR + + + + squid + S2157 + MAJOR + + + + squid + S2159 + MAJOR + + + + + + squid + S2165 + MINOR + + + + squid + S2166 + MAJOR + + + + squid + S2167 + MINOR + + + + squid + S2168 + BLOCKER + + + + squid + S2175 + MAJOR + + + + squid + S2176 + CRITICAL + + + + squid + S2177 + MAJOR + + + + squid + S2178 + BLOCKER + + + + squid + S2183 + MINOR + + + + squid + S2184 + MINOR + + + + squid + S2185 + MAJOR + + + + squid + S2186 + CRITICAL + + + + squid + S2187 + BLOCKER + + + + squid + S2188 + BLOCKER + + + + squid + S2189 + BLOCKER + + + + squid + S2200 + MINOR + + + + + + squid + S2204 + MAJOR + + + + squid + S2209 + MAJOR + + + + squid + S2222 + CRITICAL + + + + squid + S2225 + MAJOR + + + + squid + S2226 + MAJOR + + + + squid + S2230 + MAJOR + + + + squid + S2232 + MAJOR + + + + squid + S2235 + CRITICAL + + + + squid + S2236 + BLOCKER + + + + squid + S2251 + MAJOR + + + + squid + S2252 + MAJOR + + + + squid + S2254 + CRITICAL + + + + + + squid + S2272 + MINOR + + + + squid + S2273 + MAJOR + + + + squid + S2274 + CRITICAL + + + + squid + S2275 + BLOCKER + + + + squid + S2276 + BLOCKER + + + + squid + S2277 + CRITICAL + + + + squid + S2278 + BLOCKER + + + + squid + S2293 + MINOR + + + + squid + S2326 + MAJOR + + + + squid + S2386 + MINOR + + + + squid + S2387 + BLOCKER + + + + squid + S2388 + MAJOR + + + + squid + S2390 + MAJOR + + + + squid + S2391 + BLOCKER + + + + squid + S2437 + BLOCKER + + + + squid + S2438 + MAJOR + + + + squid + S2440 + MAJOR + + + + squid + S2441 + MAJOR + + + + squid + S2442 + MAJOR + + + + squid + S2445 + MAJOR + + + + squid + S2446 + MAJOR + + + + squid + S2447 + CRITICAL + + + + squid + S2583 + MAJOR + + + + squid + S2589 + MAJOR + + + + squid + S2629 + MAJOR + + + + squid + S2637 + MINOR + + + + squid + S2638 + CRITICAL + + + + squid + S2639 + MAJOR + + + + squid + S2653 + CRITICAL + + + + squid + S2674 + MINOR + + + + squid + S2675 + MAJOR + + + + squid + S2676 + MINOR + + + + squid + S2677 + MAJOR + + + + squid + S2681 + MAJOR + + + + squid + S2692 + CRITICAL + + + + squid + S2695 + BLOCKER + + + + squid + S2696 + CRITICAL + + + + squid + S2718 + MAJOR + + + + squid + S2786 + MINOR + + + + squid + S2789 + MAJOR + + + + squid + S2864 + MAJOR + + + + squid + S2885 + MAJOR + + + + squid + S2886 + MAJOR + + + + squid + S2912 + MINOR + + + + squid + S2924 + MINOR + + + + + + squid + S2970 + BLOCKER + + + + squid + S2975 + BLOCKER + + + + squid + S2976 + CRITICAL + + + + squid + S3008 + MINOR + + + format + ^[a-z][a-zA-Z0-9]*$ + + + + + squid + S3010 + MAJOR + + + + squid + S3020 + MINOR + + + + squid + S3027 + MAJOR + + + + squid + S3034 + MAJOR + + + + squid + S3038 + MINOR + + + + squid + S3042 + MAJOR + + + + squid + S3046 + BLOCKER + + + + squid + S3066 + MINOR + + + + squid + S3067 + MAJOR + + + + squid + S3281 + BLOCKER + + + + squid + S3346 + MAJOR + + + + squid + S3355 + CRITICAL + + + + squid + S3358 + MAJOR + + + + + + squid + S3400 + MINOR + + + + squid + S3421 + MINOR + + + + squid + S3422 + CRITICAL + + + + squid + S3437 + MINOR + + + + squid + S3438 + MAJOR + + + + squid + S3457 + MAJOR + + + + squid + S3518 + CRITICAL + + + + squid + S3599 + MINOR + + + + squid + S3631 + MAJOR + + + + squid + S3655 + MAJOR + + + + squid + S3725 + MAJOR + + + + + + squid + S3923 + MAJOR + + + + squid + S899 + MINOR + + + + squid + SwitchLastCaseIsDefaultCheck + CRITICAL + + + + + + squid + UselessImportCheck + MINOR + + + + squid + UselessParenthesesCheck + MAJOR + + + + diff -Nru checkstyle-7.5.1/config/findbugs-exclude.xml checkstyle-8.8/config/findbugs-exclude.xml --- checkstyle-7.5.1/config/findbugs-exclude.xml 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/config/findbugs-exclude.xml 2017-12-30 15:32:18.000000000 +0000 @@ -39,12 +39,6 @@ - - - - - - @@ -66,17 +60,8 @@ - - - - - - - - - @@ -106,16 +91,69 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + diff -Nru checkstyle-7.5.1/config/import-control-test.xml checkstyle-8.8/config/import-control-test.xml --- checkstyle-7.5.1/config/import-control-test.xml 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/import-control-test.xml 2017-11-09 14:30:16.000000000 +0000 @@ -0,0 +1,12 @@ + + + + + + + + + + diff -Nru checkstyle-7.5.1/config/import-control.xml checkstyle-8.8/config/import-control.xml --- checkstyle-7.5.1/config/import-control.xml 2017-01-27 14:29:52.000000000 +0000 +++ checkstyle-8.8/config/import-control.xml 2018-01-28 04:16:51.000000000 +0000 @@ -1,34 +1,56 @@ + "-//Puppy Crawl//DTD Import Control 1.3//EN" + "http://checkstyle.sourceforge.net/dtds/import_control_1_3.dtd"> - - - - + + + + + + + + + + + + + + + - + + + + + + + + + + + @@ -39,13 +61,17 @@ + + + - + + @@ -57,29 +83,28 @@ - - + + + + - - + - - - - + + + - - + + + @@ -90,39 +115,70 @@ + + + - + + + - + + - + + - - + + + + + - + + + - + + + - + + + + + + + + + + + + + + + diff -Nru checkstyle-7.5.1/config/intellij-idea-inspection-scope.xml checkstyle-8.8/config/intellij-idea-inspection-scope.xml --- checkstyle-7.5.1/config/intellij-idea-inspection-scope.xml 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/config/intellij-idea-inspection-scope.xml 2017-10-26 12:59:58.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru checkstyle-7.5.1/config/intellij-idea-inspections.properties checkstyle-8.8/config/intellij-idea-inspections.properties --- checkstyle-7.5.1/config/intellij-idea-inspections.properties 1970-01-01 00:00:00.000000000 +0000 +++ checkstyle-8.8/config/intellij-idea-inspections.properties 2017-10-26 12:59:58.000000000 +0000 @@ -0,0 +1,2 @@ +# this file is used by .ci/idea_inspection.sh and .ci/idea_inspection.bat +idea.exclude.patterns=.idea/**;src/test/resources/**;src/site/resources/js/google-analytics.js;src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc/ParseTreeBuilder.java;src/test/java/com/puppycrawl/tools/checkstyle/grammars/javadoc/ParseTreeBuilder.java;config/intellij-idea-inspections.properties diff -Nru checkstyle-7.5.1/config/intellij-idea-inspections.xml checkstyle-8.8/config/intellij-idea-inspections.xml --- checkstyle-7.5.1/config/intellij-idea-inspections.xml 2016-12-31 15:39:44.000000000 +0000 +++ checkstyle-8.8/config/intellij-idea-inspections.xml 2018-01-14 13:38:20.000000000 +0000 @@ -3,13 +3,13 @@
  • + * + * + * + * + * + *
    + *
    + * + * + *