rokucommunity / rokucommunity/brighterscript
ingoring diagnostics for scopes
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:
- modify all diagnostics to include
relatedInformationpaths to component files (when applicable) - modify
diagnosticFiltersto either
a. also filter diagnostics based on theirrelatedInformationpaths
b. modifydiagnosticFiltersto support a specificrelatedInformationfilter pattern
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
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