From 9e20478e6bdebc9cea49204482992471bccaf6a1 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Tue, 9 Jul 2019 15:47:18 -0700 Subject: Enforce clang-format (#6293) * Enforce clang-format on commit for core files * forgot about tests --- util/travis_compiled_push.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 04021ae7c2..f20e30cdb3 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -9,9 +9,10 @@ echo "Using git hash ${rev}" if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then -# convert to unix line-endings +# fix formatting git checkout master git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix +git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | grep -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | xargs -0 clang-format git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add git commit -m "convert to unix line-endings [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master -- cgit v1.2.3