Open darktasevski opened 3 years ago
Unfortunately we don't currently support CDATA scripts. You do bring up a good point that there is no way to disable a bsc diagnostic per-line in xml files. I created #325 to track this specific feature.
If you want to completely disable diagnostics for xml files, you could do this in your bsconfig file:
{
"diagnosticFilters": [
"components/**/*.xml"
]
}
Or, if you only wanted to disable that specific error in xml files, you could do this
{
"diagnosticFilters": [{
"src": "components/**/*.xml",
"codes": [1067]
}]
}
Also, just to set expectations, CDATA support is pretty low on our priority list since there's a simple CDATA workaround: move the code to a script file instead.
Now, we'd always be open to accepting a pull request if you're interested in trying to implement CDATA support, but I expect it to be fairly complicated because it most likely means a redesign of the way both .brs/.bs and .xml files are handled by the compiler.
Currently, I have a few components that don't have their own dedicated brs files, but a small CDATA script:
This is causing validation errors:
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.