Skip to content
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

Flake8 reports wrong severity level for E999 #220

Closed
jhossbach opened this issue Jun 15, 2022 · 3 comments · Fixed by #223
Closed

Flake8 reports wrong severity level for E999 #220

jhossbach opened this issue Jun 15, 2022 · 3 comments · Fixed by #223
Milestone

Comments

@jhossbach
Copy link
Member

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?

@ccordoba12
Copy link
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.

@jhossbach
Copy link
Member Author

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.

@ccordoba12
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants