feat: make "foo has been deprecated" warning be hoverable (#6273)
This PR modifies the "foo has been deprecated: use betterFoo instead" warning so that foo and betterFoo are hoverable.
This commit is contained in:
parent
23236ef520
commit
0a2a8e8aa4
1 changed files with 2 additions and 2 deletions
|
|
@ -51,8 +51,8 @@ def checkDeprecated [Monad m] [MonadEnv m] [MonadLog m] [AddMessageContext m] [M
|
|||
if getLinterValue linter.deprecated (← getOptions) then
|
||||
let some attr := deprecatedAttr.getParam? (← getEnv) declName | pure ()
|
||||
logWarning <| .tagged ``deprecatedAttr <|
|
||||
s!"`{declName}` has been deprecated" ++ match attr.text? with
|
||||
m!"`{.ofConstName declName true}` has been deprecated" ++ match attr.text? with
|
||||
| some text => s!": {text}"
|
||||
| none => match attr.newName? with
|
||||
| some newName => s!": use `{newName}` instead"
|
||||
| some newName => m!": use `{.ofConstName newName true}` instead"
|
||||
| none => ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue