From 9a0e32155f2ea50e73c8e2ea1a9a25bd78e1433b Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 24 Dec 2018 12:46:44 +0000 Subject: [PATCH] Making azure run all the checks even if the patterns step fail, adding tailing whitespace info --- azure-pipelines.yml | 1 + ci/code_checks.sh | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1e4e43ac03815..f0567d76659b6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,6 +43,7 @@ jobs: ci/incremental/install_miniconda.sh ci/incremental/setup_conda_environment.sh displayName: 'Set up environment' + condition: true # Do not require pandas - script: | diff --git a/ci/code_checks.sh b/ci/code_checks.sh index b594f6a2f8df6..da1b035cf3ed2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -158,7 +158,12 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then # RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Check that no file in the repo contains tailing whitespaces' ; echo $MSG - invgrep --exclude="*.svg" -RI "\s$" * + set -o pipefail + if [[ "$AZURE" == "true" ]]; then + ! grep -n --exclude="*.svg" -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}' + else + ! grep -n --exclude="*.svg" -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}' + fi RET=$(($RET + $?)) ; echo $MSG "DONE" fi