rokucommunity / rokucommunity/brighterscript
Validation of CDATA script methods inside XML
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Currently, I have a few components that don't have their own dedicated brs files, but a small CDATA script:
<?xml version="1.0" encoding="UTF-8"?>
<component name="TestComponent" extends="ContentNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
<interface>
<function name="testFunction" />
</interface>
<script type="text/brightscript">
<![CDATA[
function testFunction()
print "this is a test"
end function
]]>
</script>
</component>
This is causing validation errors:
Cannot find function with name 'testFunction' in component scope
I'm also not aware of any way to disable bsc validation inside XML files.
It would be great if disabling validation for some XML line is enabled, and if CDATA function detection is working correctly. Thanks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied XML component with bsc validation enabled, focusing on the CDATA script and its testFunction declaration. Trace how XML CDATA functions are detected and how validation-disable behavior is handled; done means the example validates correctly or has a documented way to suppress the relevant XML validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100