Enforce clang-format (#6293)
* Enforce clang-format on commit for core files * forgot about tests
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user