rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 40 forks source link

Roca Test scripts are marked as not being referenced #428

Closed xgouchet closed 2 years ago

xgouchet commented 2 years ago

I'm using Roca to write and run unit tests in my projects. Test files live in a tests folder, and by definition they are not referenced in either the source or components folders, meaning that all my test files have a warning:

This file is not being referenced by any other file in the project.

Could we disable the reference check for the tests folder?

TwitchBronBron commented 2 years ago

You can disable that warning yourself by creating a bsconfig.json at the root of your vscode workspace, and then adding this content:

{
    "diagnosticFilters": [{
        "src": "tests/**/*",
        "codes": [1013]
    ]]
}
xgouchet commented 2 years ago

Thanks didn't know that. Is there a documentation on all the diagnostic filters and which code they have?

TwitchBronBron commented 2 years ago

The list of codes that brighterscript includes is found in this file, but each bsc plugin can have its own list of filters as well.

There's also this small section in the brighterscript readme showing how to use diagnosticFilters.
image