-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/log message received threaded #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Octopus Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Run Octopus Review | ||
| uses: octopusreview/action@v1 | ||
| with: | ||
| # Public Repoなら不要 | ||
| # Private Repoの場合のみ設定 | ||
| octopus-api-key: ${{ secrets.OCTOPUS_API_KEY }} | ||
|
|
||
| # 日本語レビュー | ||
| review-language: "ja" | ||
|
|
||
| # Unity/C#向けチューニング | ||
| extra-instructions: | | ||
| **必ず日本語のみでレビューしてください。英語は使わないでください。** | ||
| You MUST respond in Japanese only. Do not use English. | ||
|
|
||
|
|
||
| レビューは簡潔にしてください。 | ||
| 重大な問題を優先してください。 | ||
|
|
||
| 以下を重点的に確認: | ||
| - NullReferenceException の可能性 | ||
| - GC Alloc | ||
| - Update/LateUpdate/FixedUpdate内の重い処理 | ||
| - LINQ多用 | ||
| - foreach boxing | ||
| - async/await の例外処理 | ||
| - async void | ||
| - UniTaskの誤用 | ||
| - IDisposable/NativeArray の Dispose漏れ | ||
| - Addressables誤用 | ||
| - Unity main thread問題 | ||
| - ScriptableObject誤用 | ||
| - イベント購読解除漏れ | ||
| - メモリリーク | ||
| - パフォーマンス問題 | ||
| - マルチスレッド問題 | ||
| - URP互換性 | ||
| - Shader負荷 | ||
|
|
||
| 以下は指摘しない: | ||
| - 命名スタイル | ||
| - コメント不足 | ||
| - 個人の好みレベルの設計 | ||
| - 過剰なリファクタ提案 | ||
| - 小さなコードスタイル | ||
| - var使用有無 | ||
| - 改行位置 | ||
| - インデント | ||
| - using順 | ||
| - trivialな最適化 | ||
|
|
||
| Unity特有の問題を優先してください。 | ||
|
|
||
| 明確な問題のみ指摘してください。 | ||
| 推測ベースの指摘は避けてください。 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,22 +19,19 @@ protected override void Awake() | |||||||||||||||||||
|
|
||||||||||||||||||||
| protected override void OnEnable() | ||||||||||||||||||||
| { | ||||||||||||||||||||
| if (SDSettings.Instance.IsShowErrorIndicator) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| Application.logMessageReceived += OnLogMessageReceived; | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Application.logMessageReceivedThreaded += OnLogMessageReceived; | ||||||||||||||||||||
| Clear(); | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Unconditional subscription when ErrorIndicator is disabled by settings The old code only subscribed to
Suggested change
AI Fix Prompt |
||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| protected override void OnDisable() | ||||||||||||||||||||
| { | ||||||||||||||||||||
| Application.logMessageReceived -= OnLogMessageReceived; | ||||||||||||||||||||
| Application.logMessageReceivedThreaded -= OnLogMessageReceived; | ||||||||||||||||||||
| Clear(); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| private void OnLogMessageReceived(string condition, string stackTrace, LogType type) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| if (!SDSettings.Instance.IsShowErrorIndicator) return; | ||||||||||||||||||||
| if (type is not (LogType.Error or LogType.Exception or LogType.Assert) || _isBlinking) return; | ||||||||||||||||||||
| HasError = true; | ||||||||||||||||||||
| StopAllCoroutines(); | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Workflow file missing newline at end of file
The YAML file is missing a trailing newline (
\ No newline at end of file). While harmless, POSIX-compliant text files should end with a newline, and some YAML linters will warn about this.AI Fix Prompt