Skip to content

TypeScript: DiagnosticsCategory Warning is not honored  #24907

Closed

Description

@egamma

The video below demonstrates tslint running as a language server plugin. Notice that the tslint warnings show up as errors. However, in the code the DiagnosticCategory is set to Warning.

tslint-language-service

This is the code that creates the diagnostic https://github.com/egamma/tslint-language-service/blob/master/src/index.ts#L61

Activity

  1. mjbvz commented on Apr 17, 2017

    @mjbvz
    Contributor

    Looks like we don't set a severity on the diagnostics which causes them to all be marked as errors. Looking into fixing this

  2. mjbvz commented on Apr 17, 2017

    @mjbvz
    Contributor

    Hmm, I don't see a category field on normal Diagnostic objects in the TSServer protocol, only on DiagnosticWithLinePosition. Let me see if this field is sent anyways when you explicitly set in the TSLint plugin

  3. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    on Apr 17, 2017
  4. mjbvz commented on Apr 17, 2017

    @mjbvz
    Contributor

    I've opened microsoft/TypeScript#15237 to track adding category to the Diagnostic objects that tsserver returns to us. This seems like an oversight in the current protocol

  5. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

typescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions