commit | c1e4abc1bcfeae3ea17279b1f3d419406769c77d | [log] [tgz] |
---|---|---|
author | Sean Risser <srisser@google.com> | Mon May 31 14:54:27 2021 -0400 |
committer | swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com <swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jun 02 19:58:17 2021 +0000 |
tree | 414a230d15cd99425bf961de489110311cef783b | |
parent | 0cfdf0c272cd1e1ac40e95d797baf216721b9026 [diff] |
Make clang-format-all.sh only look at source files clang-format will modify non source files and has no configuration options to ignore bash, python, or extensionless files. This CL is a follow up for: https://swiftshader-review.googlesource.com/c/git-hooks/+/54569 Bug: b/187094215 Change-Id: I72953bd07e3c16b70aab441a25c27abae31b6a87 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54689 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Commit-Queue: Sean Risser <srisser@google.com> Tested-by: Sean Risser <srisser@google.com>
diff --git a/src/clang-format-all.sh b/src/clang-format-all.sh index 80b7057..3054301 100755 --- a/src/clang-format-all.sh +++ b/src/clang-format-all.sh
@@ -43,7 +43,7 @@ done else BASEDIR=$(git rev-parse --show-toplevel) - FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -v '\.sh') + FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cpp$\|\.hpp\|\.c$\|\.h$') for FILE in $FILES do ${CLANG_FORMAT} -i -style=file "$BASEDIR/$FILE"