Files
cocos-engine/native/utils/fix-tidy-format.sh
Yun Hsiao Wu 6eedb24f9f gfx: object id / typed id (#3508)
* unified objectID/typedID

* record command buffers for validation

* update auto fix doc
2021-05-10 15:07:31 +08:00

14 lines
385 B
Bash

if [ $# -ne 0 ]; then
commit=$1 # can also pass ranges: HEAD~3..HEAD
else
commit=HEAD
fi
changes=`git diff-tree --no-commit-id --name-only -r $commit`
filtered=`node .github/workflows/filter_by_cdb.js $changes`
if [[ "$filtered-xxx" == "-xxx" ]]; then
echo "No source to be fixed"
else
clang-tidy --format-style=file --fix $2 $filtered
clang-format -i $filtered
fi