Files
cocos4/native/utils/tidy-fix-commit.sh
T
Yun Hsiao Wu e1c240f2d0 Clang-Tidy adaptations (#3379)
* gfx: CommandBuffer.draw accept DrawInfo

* clang-tidy config

* tidy adapt

* enable function name check

* better workflow
2021-04-12 09:41:28 +08:00

13 lines
352 B
Bash
Executable File

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 $filtered
fi