Skip to content

Flake8 reports wrong severity level for E999 #220

Closed

Description

@jhossbach

Hey,
If I understand the error codes in the flake8 documentation correctly, there is only one error with code E999 for general syntax errors. Is it possible to change the LSP severity level for this error to 1 instead of 2 as this is an actual error in the code?

Activity

  1. ccordoba12 commented on Jun 15, 2022

    @ccordoba12
    Member

    Hey @jhossbach, thanks for reporting. I don't know if that's possible but the configuration options for the server are here. And the way to configure it depends on your editor or IDE.

  2. jhossbach commented on Jun 16, 2022

    @jhossbach
    MemberAuthor

    The problem is the hardcoded lsp.DiagnosticSeverity.Warning in the internal flake8 plugin:

    'severity': lsp.DiagnosticSeverity.Warning,

    We could add a check if the msg starts with an E and set the severity level to lsp.DiagnosticSeverity.Error.
    I can open a pull request if you want.

  3. ccordoba12 commented on Jun 16, 2022

    @ccordoba12
    Member

    Ok, I see, sorry for the misunderstanding. We'll be glad if you can open a pull request for this.

  4. added this to the v1.5.0 milestone on Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions