mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Mark deprecation warnings
Some editors use different styling (e.g. strikethrough) for deprecation warnings.
This commit is contained in:
parent
94db929f74
commit
950b141d26
8 changed files with 23 additions and 5 deletions
|
@ -33,6 +33,7 @@ from ..errors import (
|
|||
CodeAction,
|
||||
CompileError,
|
||||
CompileWarning,
|
||||
DeprecatedWarning,
|
||||
MultipleErrors,
|
||||
UpgradeWarning,
|
||||
)
|
||||
|
|
|
@ -99,7 +99,7 @@ class Property(AstNode):
|
|||
hints = []
|
||||
if self.gir_property.deprecated_doc:
|
||||
hints.append(self.gir_property.deprecated_doc)
|
||||
raise CompileWarning(
|
||||
raise DeprecatedWarning(
|
||||
f"{self.gir_property.signature} is deprecated",
|
||||
hints=hints,
|
||||
)
|
||||
|
|
|
@ -142,7 +142,7 @@ class Signal(AstNode):
|
|||
hints = []
|
||||
if self.gir_signal.deprecated_doc:
|
||||
hints.append(self.gir_signal.deprecated_doc)
|
||||
raise CompileWarning(
|
||||
raise DeprecatedWarning(
|
||||
f"{self.gir_signal.signature} is deprecated",
|
||||
hints=hints,
|
||||
)
|
||||
|
|
|
@ -63,7 +63,7 @@ class TypeName(AstNode):
|
|||
hints = []
|
||||
if self.gir_type.deprecated_doc:
|
||||
hints.append(self.gir_type.deprecated_doc)
|
||||
raise CompileWarning(
|
||||
raise DeprecatedWarning(
|
||||
f"{self.gir_type.full_name} is deprecated",
|
||||
hints=hints,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue