Skip to content

Feature: Unity Method Inspector Checks#199

Merged
Eli Pinkerton (wallstop) merged 12 commits into
masterfrom
dev/wallstop/unity-methods
May 1, 2026
Merged

Feature: Unity Method Inspector Checks#199
Eli Pinkerton (wallstop) merged 12 commits into
masterfrom
dev/wallstop/unity-methods

Conversation

@wallstop
Copy link
Copy Markdown
Collaborator

Description

This PR adds a new analyzer workflow to catch missing base-method calls in MessageAwareComponent overrides and improves how those warnings are surfaced and managed in Unity.

It also hardens repository tooling around pre-commit/script checks, updates related CI validation workflows, and refreshes analyzer/documentation guidance.

User-facing outcomes:

  • New diagnostics for missing required base calls in MessageAwareComponent-based classes.
  • New Unity editor inspector overlay/fallback tooling to make analyzer warnings easier to act on.
  • New opt-out attribute and ignore-list sync flow for intentional exceptions.
  • Better pre-commit reliability and stronger npm/pre-commit validation checks in CI.
  • Updated docs and samples to reflect analyzer behavior and expected usage.

Related Issue

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor (code change that neither fixes a bug nor adds a feature)

Checklist

  • All tests pass locally
  • Code is properly formatted
  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG
  • My changes do not introduce breaking changes, or breaking changes are documented

Summary

This PR delivers two user-facing improvements:

  • Better Unity authoring feedback with new analyzer coverage for MessageAwareComponent lifecycle base-call issues, plus an inspector overlay that surfaces actionable results immediately (including cached results on editor startup).
  • More reliable contributor tooling by hardening pre-commit and CI checks (managed Jest/Prettier runners, stronger validation scripts, and workflow updates).

What this means for users

  • You get earlier, clearer warnings for common MessageAwareComponent mistakes that can break message registration.
  • You can intentionally opt out of specific base-call warnings when needed with DxIgnoreMissingBaseCall.
  • Analyzer behavior is now documented in a dedicated diagnostics reference, with sample docs updated to match.

What this means for contributors

  • Pre-commit behavior is more consistent across local shells and CI.
  • Tooling checks now better detect script/workflow edge cases and package metadata issues.
  • Tests were expanded significantly for both analyzer behavior and Node-based hook/tooling scripts.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Unity/Roslyn analyzer + editor tooling around MessageAwareComponent base-call diagnostics, while hardening Node/pre-commit/CI workflows for deterministic Jest/Prettier execution and improved validation.

Changes:

  • Introduces managed Jest/Prettier runners plus pre-commit tooling validators and supporting script libraries/tests.
  • Adds analyzer project + ignore-list infrastructure and Unity editor inspector overlay/fallback editor for surfacing base-call warnings.
  • Updates pre-commit config, CI workflows, docs, samples, and generated metadata to match new tooling and policies.

Reviewed changes

Copilot reviewed 95 out of 98 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/verify-managed-jest-fallback.js.meta Unity meta for new script asset.
scripts/verify-managed-jest-fallback.js Script to force/remove managed Jest runner for fallback-path verification.
scripts/validate-pre-commit-tooling.js.meta Unity meta for new script asset.
scripts/validate-pre-commit-tooling.js Enforces hook policy (npx non-interactive flags, managed Jest/Prettier wrappers, yamllint policy).
scripts/validate-npm-meta.js Switches npm package file discovery to npm pack --json --dry-run via platform-safe spawn helper.
scripts/run-managed-prettier.js Adds robust managed Prettier runner with pinned fallback behavior.
scripts/run-managed-jest.js.meta Unity meta for new script asset.
scripts/run-managed-jest.js Adds robust managed Jest runner with local-health checks and npm exec/npx fallback.
scripts/lib/shell-command.js.meta Unity meta for new script library.
scripts/lib/shell-command.js Centralizes cross-platform spawn handling for npm/npx (Windows shim + shell requirements).
scripts/lib/prettier-version.js Resolves pinned Prettier spec from lockfile/package.json with fallback.
scripts/generate-skills-index.js Uses platform-safe npx execution and pinned Prettier spec for formatting.
scripts/fix-md029-md051.js.meta Unity meta for new script asset.
scripts/fix-md029-md051.js Adds markdown auto-fix script for MD029/MD051 normalization.
scripts/tests/verify-managed-jest-fallback.test.js.meta Unity meta for new test asset.
scripts/tests/verify-managed-jest-fallback.test.js Tests for managed Jest fallback deletion script.
scripts/tests/validate-pre-commit-tooling.test.js.meta Unity meta for new test asset.
scripts/tests/validate-pre-commit-tooling.test.js Tests for pre-commit tooling policy validator.
scripts/tests/validate-npm-meta.test.js Expands tests for new npm-pack JSON parsing + platform spawn behavior.
scripts/tests/shell-command.test.js Tests platform spawn helper behavior.
scripts/tests/run-managed-prettier.test.js Tests managed Prettier wrapper and platform invocation.
scripts/tests/run-managed-jest.test.js.meta Unity meta for new test asset.
scripts/tests/run-managed-jest.test.js Tests managed Jest wrapper including fallback paths.
scripts/tests/prettier-version.test.js Tests Prettier version resolution logic.
scripts/tests/pre-commit-hook-stage-policy.test.js.meta Unity meta for new test asset.
scripts/tests/pre-commit-hook-stage-policy.test.js Validates hook stage coverage policies in .pre-commit-config.yaml.
scripts/tests/generate-skills-index.test.js Adds/updates tests for Prettier formatting via platform helper.
scripts/tests/fix-md029-md051.test.js.meta Unity meta for new test asset.
scripts/tests/fix-md029-md051.test.js Tests markdown auto-fix behavior for ordered lists and fragment links.
scripts/tests/detect-shell-redirection-antipattern.test.js.meta Unity meta for new test asset.
scripts/tests/detect-shell-redirection-antipattern.test.js Guards against non-portable shell redirection / direct npm/npx invocations in production scripts.
package.json Routes Jest/Prettier scripts through managed wrappers; adds preflight/validation scripts.
llms.txt Updates generated “Last Updated” date.
docs/reference/analyzers.md.meta Unity meta for new docs asset.
com.wallstop-studios.dxmessaging.sln Adds analyzer project + extra configurations; (currently has a leading blank line).
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/WallstopStudios.DxMessaging.SourceGenerators.Tests.csproj References analyzer project and links Unity-editor analyzer sources into test compilation.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/MessageAwareComponentBaseCallAnalyzerTests.cs.meta Unity meta for new test asset.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/GeneratorTestUtilities.cs Adds analyzer execution helpers and in-memory AdditionalText support for tests.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/CompilationMessageHarvestTests.cs.meta Unity meta for new test asset.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/BaseCallTypeScannerTests.cs.meta Unity meta for new test asset.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/BaseCallLogMessageParserTests.cs.meta Unity meta for new test asset.
SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.Tests/BaseCallIlInspectorTests.cs.meta Unity meta for new test asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/obj.meta Unity meta for new analyzer folder asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/bin.meta Unity meta for new analyzer folder asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/WallstopStudios.DxMessaging.Analyzer.csproj.meta Unity meta for new analyzer project file.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/WallstopStudios.DxMessaging.Analyzer.csproj Adds Roslyn 3.8-targeted analyzer project with post-build copy into Unity package.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/Analyzers/MessageAwareComponentBaseCallAnalyzer.cs.meta Unity meta for new analyzer source asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/Analyzers/IgnoreListReader.cs.meta Unity meta for new analyzer source asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/Analyzers/IgnoreListReader.cs Adds cached AdditionalFiles ignore-list loader for analyzer behavior.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer/Analyzers.meta Unity meta for new analyzer folder asset.
SourceGenerators/WallstopStudios.DxMessaging.Analyzer.meta Unity meta for new analyzer folder asset.
Samples~/UI Buttons + Inspector/README.md Normalizes ordered list numbering to MD029 “one” style.
Samples~/Mini Combat/Walkthrough.md Normalizes ordered list numbering to MD029 “one” style.
Samples~/Mini Combat/README.md Normalizes ordered list numbering to MD029 “one” style.
Samples~/DI/README.md Normalizes ordered list numbering to MD029 “one” style.
Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs.meta Unity meta for new runtime attribute.
Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs Adds opt-out attribute for missing base-call diagnostics.
Editor/SetupCscRsp.cs Ensures analyzer DLL labeling/copy and adds -additionalfile: wiring for ignore-list sidecar.
Editor/Settings/DxMessagingSettings.cs Adds base-call settings/ignore list + toggles and sidecar regeneration hooks.
Editor/Settings/DxMessagingBaseCallIgnoreSync.cs.meta Unity meta for new settings sync asset.
Editor/Settings/DxMessagingBaseCallIgnoreSync.cs Generates/reads ignore-list sidecar text file for analyzer AdditionalFiles.
Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs.meta Unity meta for new editor overlay asset.
Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs Adds inspector header overlay for base-call warnings and ignore actions.
Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs.meta Unity meta for new fallback editor asset.
Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs Adds fallback CustomEditor path to ensure overlay shows in Unity 2021 scenarios.
Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll.meta Unity plugin meta for analyzer DLL asset.
Editor/Analyzers/DxMessagingConsoleHarvester.cs.meta Unity meta updated/added for harvester asset.
Editor/Analyzers/BaseCallTypeScannerCore.cs.meta Unity meta for new scanner-core asset.
Editor/Analyzers/BaseCallTypeScannerCore.cs Adds Unity-API-free scanner core for IL reflection classification (testable via dotnet test).
Editor/Analyzers/BaseCallTypeScanner.cs.meta Unity meta for new scanner asset.
Editor/Analyzers/BaseCallTypeScanner.cs Unity wrapper that feeds TypeCache candidates/settings into scanner core.
Editor/Analyzers/BaseCallReportAggregator.cs.meta Unity meta for new aggregator asset.
Editor/Analyzers/BaseCallReportAggregator.cs Adds pure-BCL aggregator for report merge/retirement logic.
Editor/Analyzers/BaseCallLogMessageParser.cs.meta Unity meta for new parser asset.
Editor/Analyzers/BaseCallLogMessageParser.cs Adds pure parser for DXMSG006–DXMSG010 console log lines.
Editor/Analyzers/BaseCallIlInspector.cs.meta Unity meta for new IL inspector asset.
Editor/Analyzers/BaseCallIlInspector.cs Adds robust opcode-table IL walker to detect base-call patterns safely.
CONTRIBUTING.md Updates contributor workflow guidance for managed Jest/Prettier and preflight checks.
CHANGELOG.md Documents new inspector overlay cached-report behavior.
.pre-commit-config.yaml Updates hooks to use managed wrappers, adds yamllint pinning and new validation hooks/tests.
.llm/skills/index.md Updates generated skills index content.
.llm/skills/documentation/documentation-update-workflow.md Adds guidance for new markdown auto-fix + lint flow.
.llm/context.md Updates agent/developer workflow guidance around preflight tooling, portability, and markdown fixes.
.gitignore Ignores generated pre-commit/pr-description scratch files.
.github/workflows/validate-npm-meta.yml Expands CI to include Windows and watches updated test paths.
.github/workflows/pre-commit-tooling-check.yml Adds new CI workflow to validate pre-commit tooling and managed Jest fallback behavior.
.github/workflows/format-on-demand.yml Routes Prettier fixes through managed wrapper.
.cspell.json Expands language setting and adds domain terms for new analyzer/tooling vocabulary.

Comment thread Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs
Comment thread Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs
Comment thread com.wallstop-studios.dxmessaging.sln Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 105 out of 108 changed files in this pull request and generated 6 comments.

Comment thread .github/workflows/validate-npm-meta.yml Outdated
Comment thread Editor/Analyzers/BaseCallTypeScannerCore.cs Outdated
Comment thread Editor/Analyzers/BaseCallLogMessageParser.cs Outdated
Comment thread Editor/Analyzers/BaseCallReportAggregator.cs Outdated
Comment thread Editor/Analyzers/BaseCallReportAggregator.cs Outdated
Comment thread scripts/verify-managed-jest-fallback.js
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 108 out of 111 changed files in this pull request and generated 3 comments.

Comment thread Editor/Analyzers/BaseCallTypeScannerCore.cs
Comment thread Editor/Analyzers/BaseCallTypeScannerCore.cs Outdated
Comment thread scripts/fix-csharp-underscore-methods.js
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 116 out of 119 changed files in this pull request and generated 2 comments.

Comment thread scripts/validate-workflows.js
Comment thread scripts/verify-managed-jest-fallback.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 117 out of 120 changed files in this pull request and generated 1 comment.

Comment thread com.wallstop-studios.dxmessaging.sln Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 117 out of 120 changed files in this pull request and generated 3 comments.

Comment thread Editor/Analyzers/BaseCallTypeScannerCore.cs Outdated
Comment thread scripts/validate-workflows.js
Comment thread scripts/validate-workflows.js Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 117 out of 120 changed files in this pull request and generated 3 comments.

Comment thread Editor/Analyzers/BaseCallTypeScannerCore.cs Outdated
Comment thread Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs Outdated
Comment thread Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@wallstop Eli Pinkerton (wallstop) merged commit 14d4cfc into master May 1, 2026
34 checks passed
@wallstop Eli Pinkerton (wallstop) deleted the dev/wallstop/unity-methods branch May 1, 2026 04:55
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.

2 participants