Skip to content

Commit 570d795

Browse files
committed
Add style checks
1 parent b68f5c2 commit 570d795

File tree

5 files changed

+23
-430
lines changed

5 files changed

+23
-430
lines changed

azure-pipelines.yml

+19
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@ trigger:
33
- release/*
44

55
jobs:
6+
- job: Style
7+
timeoutInMinutes: 10
8+
9+
pool:
10+
vmImage: 'ubuntu-latest'
11+
12+
steps:
13+
- script: jenkins/check_copyright.sh
14+
displayName: "Copyright Check"
15+
16+
- script: jenkins/check_ascii.sh
17+
displayName: "Ascii Check"
18+
19+
- script: jenkins/check_eol.sh
20+
displayName: "EOL Check"
21+
22+
- script: jenkins/check_tabs.sh
23+
displayName: "Tab Check"
24+
625
- job: CMake
726
timeoutInMinutes: 120
827
strategy:

jenkins/check_ascii.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -e $ERRFILE ]; then # if error file exists then there were errors
2020
>&2 echo "--------------" # leading >&2 means echo to stderr
2121
>&2 echo "--- ERRORS ---"
2222
cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
23-
exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
23+
exit 1 # tell the caller there was an error (so Azure will fail the CI task)
2424
else
2525
echo "--- NO PROBLEMS DETECTED ---"
2626
fi

jenkins/check_copyright.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rm -f $ERRFILE
1818
rm -f $ERRFILETEMP
1919

2020
echo "Check Copyright > Begin Checking..."
21-
git diff --name-only `git merge-base origin/$ghprbTargetBranch HEAD` HEAD |
21+
git diff --name-only `git merge-base origin/master HEAD` HEAD |
2222
grep -v -E '\.git.*' |
2323
grep -v -E '\.xml$' |
2424
grep -v -E '\.props$' |
@@ -59,7 +59,7 @@ if [ -e $ERRFILE ]; then # if error file exists then there were errors
5959
>&2 echo "--- ERRORS ---"
6060
cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
6161
>&2 echo "--------------"
62-
exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
62+
exit 1 # tell the caller there was an error (so Azure will fail the CI task)
6363
else
6464
echo "--- NO PROBLEMS DETECTED ---"
6565
fi

jenkins/check_eol.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ -e $ERRFILE ]; then # if error file exists then there were errors
2121
>&2 echo "--------------" # leading >&2 means echo to stderr
2222
>&2 echo "--- ERRORS ---"
2323
cat $ERRFILE 1>&2 # send output to stderr so it can be redirected as error if desired
24-
exit 1 # tell the caller there was an error (so Jenkins will fail the CI task)
24+
exit 1 # tell the caller there was an error (so Azure will fail the CI task)
2525
else
2626
echo "--- NO PROBLEMS DETECTED ---"
2727
fi

0 commit comments

Comments
 (0)