fix: restrict CreateObject component usage detection - #197
Merged
Conversation
Signed-off-by: Aysajan Eziz <aeziz@northset.ai>
TwitchBronBron
requested changes
Aug 6, 2026
TwitchBronBron
left a comment
Member
There was a problem hiding this comment.
Thanks for this. Can you add a few unit tests just verifying your new logic doesn't crash for these situations:
createObject()
createObject("roRegex")Signed-off-by: Aysajan Eziz <aeziz@northset.ai>
Contributor
Author
|
Added the requested regression coverage for both |
TwitchBronBron
enabled auto-merge (squash)
August 11, 2026 14:18
TwitchBronBron
added a commit
that referenced
this pull request
Sep 9, 2026
The master->v1 merge kept v1's generic `LiteralExpression` component-name visitor alongside master's new `CallExpression` visitor, but #197 had *replaced* the former with the latter. Keeping both meant any bare string literal matching a component name still counted as usage, which defeated #197 and left the new test with nothing to report. Also switch the test's `diagnosticFilters` from legacy numeric codes to the human-readable string codes v1 now emits, so the expected CreateObject errors are actually filtered out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Count a component as used only when it is the component argument to CreateObject("roSGNode", ...), not any matching string literal.
Change
src/plugins/checkUsage/createObjectUsage.spec.tssrc/plugins/checkUsage/index.tsChecks
npx mocha --no-config --require ts-node/register --require source-map-support/register src/plugins/checkUsage/createObjectUsage.spec.ts— passed in a network-isolated container.Fixes #61
AI assistance was used; I reviewed and own this change.
Verification
Northset proof-of-pass receipt M-115
Contributor self-run; not maintainer verification.