rokucommunity / vscode-brightscript-language

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

Diagnostic Filters not being applied to files that do not exist [moved from BSLint] #584

Closed addison-adler closed 3 months ago

addison-adler commented 3 months ago

[originally posted in BS Lint, but I don't think that was the right place..]

I have diagnostic filters for **/maestro/**

I discovered the issue while using Maestro. Maestro creates a ton of files under maestro/generated. However, the linter thinks these files are located under components/maestro/generated when the actual path is src/components/maestro/generated.

So there are two problems here:

  1. The source path for maestro/generated is incorrect (I'm not sure if this is caused by maestro or by bsconfig) - this might be a maestro problem?
  2. Regardless though, the errors are not being filtered out despite diagnostic filters that should be applied

The files produce 1082 errors. If you click on any of the warnings you receive an editor error "Cannot open because file not found" because the path is incorrect


bsconfig.json

{
  "sourceMap": true,
  "stagingDir": "build",
  "retainStagingDir": true,
  "rootDir": "src",
  "files": [
    "manifest",
    "source/**/*.*",
    "images/**/*.*",
    "fonts/**/*.*",
    "meta/**/*.*",
    "components/**/*.*",
  ],
  "autoImportComponentScript": true,
  "createPackage": false,
  "diagnosticFilters": [
    "**/roku_modules/**",
    "**/maestro/**",
    "**/RALETrackerTask.*",
  ],
  "plugins": [
    "maestro-roku-bsc-plugin",
    "rooibos-roku",
    "roku-log-bsc-plugin",
    "@rokucommunity/bslint"
  ],
  "maestro": {
    "excludeFilters": [
      "**/RALETrackerTask.*",
      "**/roku_modules/**/*",
      "**/node_modules/**/*",
      "**/rooibos/**/*"
    ],
    "buildForIDE": true,
    "extraValidation": {
      "doExtraValidation": true,
      "doExtraImportValidation": true,
      "excludeFilters": []
    }
  },
  "rooibos": {
    "isRecordingCodeCoverage": false,
    "testsFilePattern": null
  },
  "rokuLog": {
    "strip": false,
    "insertPkgPath": true,
    "removeComments": true
  },
  "logLevel": "error",
  "transpileOptions": {
    "removeParameterTypes": true
  }
}
addison-adler commented 3 months ago

This should be resolved by https://github.com/georgejecook/maestro-roku-bsc-plugin/pull/94