diff --git a/.ci/validation.sh b/.ci/validation.sh index e519c4de2..de0344821 100755 --- a/.ci/validation.sh +++ b/.ci/validation.sh @@ -48,7 +48,7 @@ sevntu-checks) cd sevntu-checks mvn -e --no-transfer-progress -Pcoverall install mvn -e --no-transfer-progress verify -Pno-validations,selftesting - if [[ $TRAVIS == 'true' ]]; then + if [[ $CI == 'true' ]]; then mvn -e --no-transfer-progress -Pcoverall jacoco:report coveralls:report fi ;; @@ -117,7 +117,10 @@ sonarqube) # SONAR_TOKEN=xxxxxx ./.ci/validation.sh sonarqube # execution on local for non-master: # SONAR_TOKEN=xxxxxx PR_NUMBER=xxxxxx PR_BRANCH_NAME=xxxxxx ./.ci/validation.sh sonarqube - checkForVariable "SONAR_TOKEN" + if [ -z "$SONAR_TOKEN" ]; then + echo "SONAR_TOKEN is not set." + exit 1 + fi if [[ $PR_NUMBER =~ ^([0-9]+)$ ]]; then SONAR_PR_VARIABLES="-Dsonar.pullrequest.key=$PR_NUMBER" @@ -129,12 +132,14 @@ sonarqube) export MAVEN_OPTS='-Xmx2000m' # until https://github.com/checkstyle/checkstyle/issues/11637 # shellcheck disable=SC2086 - mvn -e --no-transfer-progress -Pno-validations clean package sonar:sonar \ + mvn -e --no-transfer-progress clean package sonar:sonar \ $SONAR_PR_VARIABLES \ -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.login="$SONAR_TOKEN" \ - -Dsonar.projectKey=org.checkstyle:sevntu \ - -Dsonar.organization=checkstyle + -Dsonar.projectKey=org.checkstyle:sevntu-checks \ + -Dsonar.organization=checkstyle \ + -Dmaven.test.failure.ignore=true \ + -Dcheckstyle.ant.skip=true -Dpmd.skip=true echo "report-task.txt:" cat target/sonar/report-task.txt echo "Verification of sonar gate status" diff --git a/.circleci/config.yml b/.circleci/config.yml index 406d0ca2c..9e1d31e0e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - restore_cache: name: Restore Maven repo cache keys: - - mvn-cache-{{ checksum "pom.xml" }} + - mvn-cache-{{ checksum "sevntu-checks/pom.xml" }} - run: command: << parameters.command >> - run: @@ -28,7 +28,7 @@ jobs: ./.ci/validation.sh git-diff - save_cache: name: Save Maven repo cache - key: mvn-cache-{{ checksum "pom.xml" }} + key: mvn-cache-{{ checksum "sevntu-checks/pom.xml" }} paths: - .m2 diff --git a/sevntu-checks/config/checkstyle-non-main-files-suppressions.xml b/sevntu-checks/config/checkstyle-non-main-files-suppressions.xml index de647f8e8..f0bcbef33 100644 --- a/sevntu-checks/config/checkstyle-non-main-files-suppressions.xml +++ b/sevntu-checks/config/checkstyle-non-main-files-suppressions.xml @@ -25,6 +25,7 @@ +