From 8bd982500a3f8f798f64ab5ac8d0a325e936de02 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Jan 2025 16:09:24 +0800 Subject: [PATCH 1/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 +- native/cocos/core/scene-graph/Node.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index 56c376f1ed3..bd2c5e96b72 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -93,7 +93,7 @@ jobs: clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi - name: clang-tidy-action - uses: PatriceJiang/clang-tidy-action@master + uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' with: fixesFile: clang-fixes.yaml diff --git a/native/cocos/core/scene-graph/Node.cpp b/native/cocos/core/scene-graph/Node.cpp index 66c5daeb1f1..6cfe5ef5603 100644 --- a/native/cocos/core/scene-graph/Node.cpp +++ b/native/cocos/core/scene-graph/Node.cpp @@ -620,27 +620,27 @@ void Node::setWorldScale(float x, float y, float z) { Mat3 localRotInv; Mat4 worldMatrixTmp = _worldMatrix; Vec3 rescaleFactor; - + if (oldWorldScale.x == 0) { oldWorldScale.x = 1; worldMatrixTmp.m[0] = 1.F; rotationFlag = TransformBit::ROTATION; } - + if (oldWorldScale.y == 0) { oldWorldScale.y = 1; worldMatrixTmp.m[5] = 1.F; rotationFlag = TransformBit::ROTATION; } - + if (oldWorldScale.z == 0) { oldWorldScale.z = 1; worldMatrixTmp.m[10] = 1.F; rotationFlag = TransformBit::ROTATION; } - + rescaleFactor = _worldScale / oldWorldScale; - + // apply new world scale to temp world matrix worldMatrixTmp.scale(rescaleFactor); // need opt // get temp local matrix @@ -655,7 +655,7 @@ void Node::setWorldScale(float x, float y, float z) { _localScale.x = Vec3{localRS.m[0], localRS.m[1], localRS.m[2]}.length(); _localScale.y = Vec3{localRS.m[3], localRS.m[4], localRS.m[5]}.length(); _localScale.z = Vec3{localRS.m[6], localRS.m[7], localRS.m[8]}.length(); - + if (_localScale.x == 0 || _localScale.y == 0 || _localScale.z == 0) { rotationFlag = TransformBit::ROTATION; } @@ -927,6 +927,7 @@ void Node::destruct() { _children.clear(); _scene = nullptr; _userData = nullptr; + _userData = nullptr; } // From 40e23765d2442cf03ffc326ff30d1659783ee44c Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Jan 2025 16:16:48 +0800 Subject: [PATCH 2/9] test clang tidy --- native/cocos/core/scene-graph/Node.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/native/cocos/core/scene-graph/Node.cpp b/native/cocos/core/scene-graph/Node.cpp index 6cfe5ef5603..d42fb658a17 100644 --- a/native/cocos/core/scene-graph/Node.cpp +++ b/native/cocos/core/scene-graph/Node.cpp @@ -927,7 +927,6 @@ void Node::destruct() { _children.clear(); _scene = nullptr; _userData = nullptr; - _userData = nullptr; } // From 8bc8895cc5aa4f27ec944efa23eaeb1987795972 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Jan 2025 16:41:12 +0800 Subject: [PATCH 3/9] test clang tidy --- native/cocos/core/scene-graph/Node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/core/scene-graph/Node.h b/native/cocos/core/scene-graph/Node.h index 8eaceb5cb20..8d39b903f97 100644 --- a/native/cocos/core/scene-graph/Node.h +++ b/native/cocos/core/scene-graph/Node.h @@ -679,7 +679,7 @@ class Node : public CCObject { uint32_t _hasChangedFlagsVersion{0}; uint32_t _hasChangedFlags{0}; - bool _eulerDirty{false}; + bool _eulerDirty{true}; friend class NodeActivator; friend class Scene; From 74efe7e42029baf98327a85c00eecd0ef9d91648 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Jan 2025 17:16:29 +0800 Subject: [PATCH 4/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index bd2c5e96b72..8aceba60c53 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -92,6 +92,8 @@ jobs: else clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi + - name: Enable Debug Logs + run: echo "::set-output name=ACTIONS_STEP_DEBUG::true" - name: clang-tidy-action uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' From c31e22367855739a4fadd10e41595c1384805fe6 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 23 Jan 2025 09:36:50 +0800 Subject: [PATCH 5/9] test clang tidy --- .github/workflows/native-linter-android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index 8aceba60c53..626cfd0f249 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -92,8 +92,6 @@ jobs: else clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi - - name: Enable Debug Logs - run: echo "::set-output name=ACTIONS_STEP_DEBUG::true" - name: clang-tidy-action uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' @@ -102,3 +100,5 @@ jobs: noFailOnIssue: false repo-token: ${{ secrets.GITHUB_TOKEN }} error-limit: 200 + env: + ACTIONS_STEP_DEBUG: true From 596f243b0bc698fb138b189e853d57b6ec4f8337 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 23 Jan 2025 10:56:19 +0800 Subject: [PATCH 6/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index 626cfd0f249..f1700668e6b 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -92,6 +92,8 @@ jobs: else clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi + - name: Clear GitHub Action cache + run: rm -rf /home/runner/work/_actions/minggo/clang-tidy-action - name: clang-tidy-action uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' From 6f7c4d543586a4a6bfdd00fe65f783a9dabd6806 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 23 Jan 2025 11:05:18 +0800 Subject: [PATCH 7/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index f1700668e6b..626cfd0f249 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -92,8 +92,6 @@ jobs: else clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi - - name: Clear GitHub Action cache - run: rm -rf /home/runner/work/_actions/minggo/clang-tidy-action - name: clang-tidy-action uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' From 849f1d7e1e3bfec123d2adf0d124db9e620d1968 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 23 Jan 2025 11:22:25 +0800 Subject: [PATCH 8/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index 626cfd0f249..382317550df 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -93,7 +93,7 @@ jobs: clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi - name: clang-tidy-action - uses: minggo/clang-tidy-action@master + uses: minggo/clang-tidy-action@v1.1 if: hashFiles('clang-fixes.yaml') != '' with: fixesFile: clang-fixes.yaml From 4950b6ae4ef75026e16cdb7886671747edfc7d95 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 23 Jan 2025 15:58:51 +0800 Subject: [PATCH 9/9] test clang tidy --- .github/workflows/native-linter-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/native-linter-android.yml b/.github/workflows/native-linter-android.yml index 382317550df..626cfd0f249 100644 --- a/.github/workflows/native-linter-android.yml +++ b/.github/workflows/native-linter-android.yml @@ -93,7 +93,7 @@ jobs: clang-tidy --format-style=file --export-fixes=clang-fixes.yaml $FILTERED fi - name: clang-tidy-action - uses: minggo/clang-tidy-action@v1.1 + uses: minggo/clang-tidy-action@master if: hashFiles('clang-fixes.yaml') != '' with: fixesFile: clang-fixes.yaml