Skip to content

Commit a71c121

Browse files
datapythonistajreback
authored andcommitted
Making azure run all the checks even if the patterns step fail, adding tailing whitespace info (#24410)
1 parent fc7bc3f commit a71c121

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

azure-pipelines.yml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
ci/incremental/install_miniconda.sh
4444
ci/incremental/setup_conda_environment.sh
4545
displayName: 'Set up environment'
46+
condition: true
4647
4748
# Do not require pandas
4849
- script: |

ci/code_checks.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,12 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
158158
# RET=$(($RET + $?)) ; echo $MSG "DONE"
159159

160160
MSG='Check that no file in the repo contains tailing whitespaces' ; echo $MSG
161-
invgrep --exclude="*.svg" -RI "\s$" *
161+
set -o pipefail
162+
if [[ "$AZURE" == "true" ]]; then
163+
! grep -n --exclude="*.svg" -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}'
164+
else
165+
! grep -n --exclude="*.svg" -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}'
166+
fi
162167
RET=$(($RET + $?)) ; echo $MSG "DONE"
163168
fi
164169

0 commit comments

Comments
 (0)