Skip to content

fix(ci): improve CodeQL analysis quality with Unity build#574

Closed
JasonXuDeveloper wants to merge 1 commit into
masterfrom
fix/codeql-build-quality
Closed

fix(ci): improve CodeQL analysis quality with Unity build#574
JasonXuDeveloper wants to merge 1 commit into
masterfrom
fix/codeql-build-quality

Conversation

@JasonXuDeveloper
Copy link
Copy Markdown
Owner

Summary

  • Use game-ci/unity-builder to compile Unity scripts before CodeQL analysis
  • This provides proper type information and should resolve the "Low C# analysis quality" warning

Changes

  • Changed build-mode: none to build-mode: manual
  • Added Unity build step using game-ci/unity-builder
  • Added Unity Library caching for faster subsequent runs
  • Added license return step

Why

The previous build-mode: none couldn't resolve Unity types properly, resulting in:

  • Percentage of calls with call target: 52% (threshold 85%)
  • Percentage of expressions with known type: 70% (threshold 85%)

By actually compiling the Unity project, CodeQL can analyze the compiled assemblies with full type information.

Test plan

  • Verify CodeQL workflow runs successfully
  • Check if quality metrics improve above thresholds

🤖 Generated with Claude Code

@JasonXuDeveloper JasonXuDeveloper force-pushed the fix/codeql-build-quality branch from cf90bf5 to 5ea2162 Compare January 25, 2026 11:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 25, 2026

Unity Test Results

EditMode: All tests passed
PlayMode: All tests passed

Unity Version: 2022.3.55f1
Project Path: UnityProject

✅ All tests passed! The PR is ready for review.

View workflow run

Click here to view the full workflow run

- Use game-ci/unity-builder to compile Unity scripts before CodeQL
  analysis for proper type information
- Create centralized .github/unity-config.env for Unity CI settings
- Both codeql.yml and unity-tests.yml load from config file at runtime
- Inputs can still override config values when needed

This resolves the "Low C# analysis quality" warning by providing
CodeQL with compiled assemblies that have full type information.

Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JasonXuDeveloper JasonXuDeveloper force-pushed the fix/codeql-build-quality branch from 5ea2162 to 7971ec3 Compare January 25, 2026 11:24
@claude
Copy link
Copy Markdown

claude Bot commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

2 similar comments
@claude
Copy link
Copy Markdown

claude Bot commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@claude
Copy link
Copy Markdown

claude Bot commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@JasonXuDeveloper
Copy link
Copy Markdown
Owner Author

Closing this PR - the added complexity (Unity build in CodeQL, license seat conflicts) isn't worth the marginal improvement in analysis quality. The existing build-mode: none approach works well enough for a Unity project.

@JasonXuDeveloper JasonXuDeveloper deleted the fix/codeql-build-quality branch January 25, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant