Prevent clang-format messing up placeholder tokens within keyboard templates (#6790)
* Use .template file extension for keyboard template files * Filter out .template files completely before passing to clang-format * Undo file extension stuff; just ignore quantum/template dir
This commit is contained in:
@ -12,7 +12,7 @@ if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; the
|
||||
# fix formatting
|
||||
git checkout master
|
||||
git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix
|
||||
git diff --diff-filter=AM --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=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | grep -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -v 'quantum/template' | xargs -0 clang-format
|
||||
git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add
|
||||
git commit -m "format code according to conventions [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master
|
||||
|
||||
|
Reference in New Issue
Block a user