Skip to content

Commit

Permalink
Adjusted minimum severity to info
Browse files Browse the repository at this point in the history
Was using 'hint' previously but VS Code doesn't seem to display those
  • Loading branch information
suoto committed Oct 16, 2019
1 parent 1a252b3 commit ef7dbed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions hdl_checker/lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ def checkerDiagToLspDict(diag):
# Translate the error into LSP severity
severity = diag.severity

if severity in (DiagType.INFO, DiagType.STYLE_INFO):
severity = defines.DiagnosticSeverity.Hint
elif severity in (DiagType.STYLE_WARNING, DiagType.STYLE_ERROR):
if severity in (
DiagType.STYLE_WARNING,
DiagType.STYLE_ERROR,
DiagType.INFO,
DiagType.STYLE_INFO,
):
severity = defines.DiagnosticSeverity.Information
elif severity in (DiagType.WARNING,):
severity = defines.DiagnosticSeverity.Warning
Expand Down
4 changes: 2 additions & 2 deletions hdl_checker/tests/test_lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def __str__(self):
class TestCheckerDiagToLspDict(unittest2.TestCase):
@parameterized.parameterized.expand(
[
(DiagType.INFO, defines.DiagnosticSeverity.Hint),
(DiagType.STYLE_INFO, defines.DiagnosticSeverity.Hint),
(DiagType.INFO, defines.DiagnosticSeverity.Information),
(DiagType.STYLE_INFO, defines.DiagnosticSeverity.Information),
(DiagType.STYLE_WARNING, defines.DiagnosticSeverity.Information),
(DiagType.STYLE_ERROR, defines.DiagnosticSeverity.Information),
(DiagType.WARNING, defines.DiagnosticSeverity.Warning),
Expand Down

0 comments on commit ef7dbed

Please sign in to comment.