rokucommunity / rokucommunity/brighterscript

ingoring diagnostics for scopes

Open
#609 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

I think we have a gap in diagnostic filtering. Consider this scenario:

SGDEX was modified to include pkg:/source/utils.brs and call a single logging function.

SGDEX is ignored from diagnostics like this:

bsconfig.json

{
    "diagnosticFilters": [
         "**/SGDEX/**"
    ]
}

Now consider this diagnostic:

source/utils.brs:10:39 - error BS1001: Cannot find function with name 'UnrelatedFunction' when this file is included in scope 'components/SGDEX/ComponentController/ComponentController.xml'

The diagnostic is attached to pkg:/source/utils.brs, not SGDEX. So there's no way to bulk-ignore all SGDEX-related errors of this type.

To solve this issue, I think we need to make the following changes:

  1. modify all diagnostics to include relatedInformation paths to component files (when applicable)
  2. modify diagnosticFilters to either
    a. also filter diagnostics based on their relatedInformation paths
    b. modify diagnosticFilters to support a specific relatedInformation filter pattern

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name specific files, tests, or entry points. Start by locating diagnosticFilters and the diagnostic relatedInformation handling, then determine how component scope paths are represented; done means SGDEX-related diagnostics can be filtered through their associated component paths without losing useful diagnostic information.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.