diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-05-16 16:09:27 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-05-23 18:07:48 +0300 |
commit | d2562fb0cb2c2b21b628b265ef24a6c8cbac9608 (patch) | |
tree | 78cb96fe1cf493f5b151167c73c3a6d5f157832a /scripts | |
parent | f4386378e466a519d8f97923ba43ea22dec1e933 (diff) |
travis: move code style check to separate job
Move this check to separate job to better see which exactly
task was failed.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci-checkpatches.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh new file mode 100755 index 000000000..cb1c4e65d --- /dev/null +++ b/scripts/ci-checkpatches.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +PATCHES=$1 +echo "Run checkpatch for ${PATCHES}" +# Generate patches provided with $1. +# In case of force push and range is broken +# validate only the latest commit if it's not merge commit. +git format-patch ${PATCHES} +if [ $? -ne 0 ]; then + git show --summary HEAD| grep -q '^Merge:'; + if [ $? -ne 0 ]; then + git format-patch HEAD^; + perl ./scripts/checkpatch.pl *.patch; + fi; +else + perl ./scripts/checkpatch.pl *.patch; +fi |