-
Notifications
You must be signed in to change notification settings - Fork 56
Refine Diagnostic Filters and adds human-readable diagnostic names #1241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@josephjunker Please take a look at this PR -- you did a lot of work on DiagnosticFiltering and I hope that's respected here. |
|
@markwpearce Looks good to me! |
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did an initial pass of this and have some suggestions. I still need to go through every diagnostic code and tweak their names, that'll come later.
Co-authored-by: Bronley Plumb <[email protected]>
Co-authored-by: Bronley Plumb <[email protected]>
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've only made it through diagnostic code 1063. Figure I'll submit what I have awhile, and keep working.
Co-authored-by: Bronley Plumb <[email protected]>
Co-authored-by: Bronley Plumb <[email protected]>
Co-authored-by: Bronley Plumb <[email protected]>
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some more name tweaks.
Co-authored-by: Bronley Plumb <[email protected]>
Co-authored-by: Bronley Plumb <[email protected]>
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, finally made it through the first pass of these names. Sorry it took so long. I'll try and work on addressing these today and tomorrow
Co-authored-by: Bronley Plumb <[email protected]>
Co-authored-by: Bronley Plumb <[email protected]>
…mmunity/brighterscript into refine_diagnostic_filters
…` or `expectedIdentifier`
…nd update diagnostics for invalid characters in function names
…ate related diagnostic messages
…expectedOpenParenToFollowCallfuncIdentifier)
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew, what a ride. That was quite a lot of effort. Awesome work @markwpearce , very much appreciated.
Addresses #1060
bsconfig.json"diagnosticFilters"option to look like this:In more detail:
{ "diagnosticFilters": [ 123, // numbers are applied to diagnostic code or legacyCode against all files "some-diagnostic-name", // strings are applied to diagnostic code (or legacyCode) against all files { "codes": ["code-1", "code-2"]}, // an object is allowed with a list of codes to applied against all files { "files": "some/glob/**" }, // a file list will suppress all diagnostics in matched files { "files": "other/glob/**", "codes": ["some-code"]}, //suppress specific codes in matched files { "files": [ //files can be an array of globs "other/glob/**", "other2/glob/**" ], "codes": ["some-code"] }, { "files": [{ "src": "yet/another/glob/**"}] }, //file listings in an array can be a object that references src path { "files": [{ "dest": "yet/another/glob/**"}] } //file listings in an array can be a object that references dest path ]}Additionally, I went through all the diagnostics and assigned a human-readable
codeproperty to them, which can also be used for any diagnostic filtering. The previous (numerical) code property was renamed tolegacyCode