commit | 3f4895916a3cfa72cbfbe0dcc71cd2c9ae26f975 | [log] [tgz] |
---|---|---|
author | Gunnar Mills <gmills@us.ibm.com> | Thu Jun 11 13:13:17 2020 -0500 |
committer | Gunnar Mills <gmills@us.ibm.com> | Thu Jun 11 13:13:17 2020 -0500 |
tree | 2c42a1c7b4dcadde1fd42e5ae91d98fb77af4cb0 | |
parent | 4a16a026b60a3bf54161ed4e4bc34885b4e3e6c3 [diff] |
Enable clang-format-10 Move away from hardcoding the version of clang-format. Took from: https://github.com/openbmc/libmctp/blob/f5afcd7e6597dcdeaa475aa7194ecfae2e82d114/format-code.sh#L3 Change-Id: I574d6ea2f1221001754aef36aa8627d270dff178 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/format-code.sh b/format-code.sh index d298d36..64bf6e9 100755 --- a/format-code.sh +++ b/format-code.sh
@@ -14,10 +14,12 @@ echo "Formatting code under $DIR/" +: ${CLANG_FORMAT:=clang-format} + # Only validate certain areas of the code base for # formatting due to some imported code in webui if [ -f ".clang-format" ]; then - clang-format-8 -i `git ls-files '*.js'` + $CLANG_FORMAT -i `git ls-files '*.js'` git --no-pager diff --exit-code fi