Skip to content

Commit 0e2d2cf

Browse files
committed
Add obsoletion markers to types that are obsolete
1 parent cc7c21a commit 0e2d2cf

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"fantomas": {
12-
"version": "6.2.2",
12+
"version": "6.2.3",
1313
"commands": [
1414
"fantomas"
1515
]

src/Types.fs

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ type SymbolInformation =
207207
Tags: SymbolTag[] option
208208

209209
/// Indicates if this symbol is deprecated.
210-
/// @deprecated Use tags instead
210+
[<Obsolete("Use Tags instead")>]
211211
Deprecated: bool option
212212

213213
/// The location of this symbol. The location's range is used by a tool
@@ -245,7 +245,7 @@ type DocumentSymbol =
245245
/// tags for this document symbol.
246246
Tags: SymbolTag[] option
247247
/// Indicates if this symbol is deprecated.
248-
/// @deprecated Use tags instead
248+
[<Obsolete("Use Tags instead")>]
249249
Deprecated: bool option
250250
/// The range enclosing this symbol not including leading/trailing whitespace
251251
/// but everything else like comments. This information is typically used to
@@ -1141,7 +1141,7 @@ type RenameClientCapabilities =
11411141
DynamicRegistration: bool option
11421142

11431143
/// Client supports testing for validity of rename operations before execution.
1144-
/// @since version 3.12.0
1144+
/// @since 3.12.0
11451145
PrepareSupport: bool option
11461146

11471147
/// Client supports the default behavior result
@@ -1420,11 +1420,11 @@ type InitializeParams =
14201420
/// https://en.wikipedia.org/wiki/IETF_language_tag)
14211421
Locale: string option
14221422
/// The rootPath of the workspace. Is null if no folder is open.
1423-
/// @deprecated in favour of `rootUri`.
1423+
[<Obsolete("Use RootUri instead")>]
14241424
RootPath: string option
14251425
/// The rootUri of the workspace. Is null if no folder is open. If both
14261426
/// `rootPath` and `rootUri` are set `rootUri` wins.
1427-
/// @deprecated in favour of `workspaceFolders`
1427+
[<Obsolete("Use WorkspaceFolders instead")>]
14281428
RootUri: string option
14291429
/// User provided initialization options.
14301430
InitializationOptions: JToken option
@@ -2107,10 +2107,8 @@ type TextDocumentSaveReason =
21072107
/// Manually triggered, e.g. by the user pressing save, by starting debugging,
21082108
/// or by an API call.
21092109
| Manual = 1
2110-
21112110
/// Automatic after a delay.
21122111
| AfterDelay = 2
2113-
21142112
/// When the editor lost focus.
21152113
| FocusOut = 3
21162114

@@ -2449,14 +2447,14 @@ type Command =
24492447

24502448
type CompletionItemLabelDetails =
24512449
{
2452-
/// An optional string which is rendered less prominently directly after
2453-
/// {@link CompletionItem.label label}, without any spacing. Should be used
2454-
/// for function signatures or type annotations.
2450+
/// <summary>An optional string which is rendered less prominently directly after
2451+
/// <see cref="CompletionItem.Label">label</see>, without any spacing. Should be used
2452+
/// for function signatures or type annotations.</summary>
24552453
Detail: string option
24562454

2457-
/// An optional string which is rendered less prominently after
2458-
/// {@link CompletionItemLabelDetails.detail}. Should be used for fully
2459-
/// qualified names or file path.
2455+
/// <summary>An optional string which is rendered less prominently after
2456+
/// <see cref="CompletionItemLabelDetails.Detail" />. Should be used for fully
2457+
/// qualified names or file path.</summary>
24602458
Description: string option
24612459
}
24622460

@@ -2516,7 +2514,7 @@ type CompletionItem =
25162514
Documentation: Documentation option
25172515

25182516
/// Indicates if this item is deprecated.
2519-
/// @deprecated Use `tags` instead if supported.
2517+
[<Obsolete("Use Tags instead if supported")>]
25202518
Deprecated: bool option
25212519

25222520
/// Select this item when showing.
@@ -2542,8 +2540,8 @@ type CompletionItem =
25422540
/// and a completion item with an `insertText` of `console` is provided it
25432541
/// will only insert `sole`. Therefore it is recommended to use `textEdit` instead
25442542
/// since it avoids additional client side interpretation.
2545-
///
2546-
/// @deprecated Use textEdit instead.
2543+
2544+
[<Obsolete("Use TextEdit instead")>]
25472545
InsertText: string option
25482546

25492547
/// The format of the insert text. The format applies to both the `insertText` property
@@ -3014,10 +3012,8 @@ type GotoResult =
30143012
type DocumentHighlightKind =
30153013
/// A textual occurrence.
30163014
| Text = 1
3017-
30183015
/// Read-access of a symbol, like reading a variable.
30193016
| Read = 2
3020-
30213017
/// Write-access of a symbol, like writing to a variable.
30223018
| Write = 3
30233019

@@ -3693,6 +3689,7 @@ module MonikerKind =
36933689
let Import = "import"
36943690
/// The moniker represents a symbol that is exported from a project
36953691
let Export = "export"
3692+
36963693
/// The moniker represents a symbol that is local to a project (e.g. a local
36973694
/// variable of a function, a class not visible outside the project, ...)
36983695
let Local = "local"

0 commit comments

Comments
 (0)