Fix RemoteAsset false positives for hash URLs and variable lookups#1121
Merged
charlespwd merged 1 commit intomainfrom Feb 5, 2026
Merged
Fix RemoteAsset false positives for hash URLs and variable lookups#1121charlespwd merged 1 commit intomainfrom
charlespwd merged 1 commit intomainfrom
Conversation
Contributor
Author
|
PR looks good. |
graygilmore
reviewed
Feb 5, 2026
Contributor
graygilmore
left a comment
There was a problem hiding this comment.
Lots of comments to remove but the changes seem reasonable!
packages/theme-check-common/src/checks/remote-asset/index.spec.ts
Outdated
Show resolved
Hide resolved
packages/theme-check-common/src/checks/remote-asset/index.spec.ts
Outdated
Show resolved
Hide resolved
packages/theme-check-common/src/checks/remote-asset/index.spec.ts
Outdated
Show resolved
Hide resolved
Contributor
Author
|
I'll make sure to update my best practices to chill on the comments :D |
c74d631 to
496f1bb
Compare
- Add isHashUrl() helper to detect hash-only URLs and skip linting them - Add startsWithVariableLookup() check to skip linting when attribute values start with a VariableLookup (can't statically resolve variables) - Add test cases for both patterns Fixes #995, Fixes #982 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
db6a989 to
80bb346
Compare
graygilmore
approved these changes
Feb 5, 2026
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
Fixes #995, Fixes #982
This PR fixes two false positive issues in the
RemoteAssetcheck:#anchor,#section) were incorrectly flagged as remote assetsvideo_source.url) were incorrectly flagged when static analysis can't determine what's in the variableChanges
isHashUrl()helper to detect hash-only URLs and skip linting themstartsWithVariableLookup()check to skip linting when attribute values start with aVariableLookup(since we can't statically know what's in variables)Test plan