Skip to content

Commit 9c91c2c

Browse files
authored
Bump analyzers and Fantomas (#1257)
1 parent 6d665db commit 9c91c2c

26 files changed

+106
-129
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
]
1616
},
1717
"fantomas": {
18-
"version": "6.2.3",
18+
"version": "6.3.1",
1919
"commands": [
2020
"fantomas"
2121
]
2222
},
2323
"fsharp-analyzers": {
24-
"version": "0.23.0",
24+
"version": "0.25.0",
2525
"commands": [
2626
"fsharp-analyzers"
2727
]

paket.dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lowest_matching: true
1414
nuget BenchmarkDotNet 0.13.5
1515
nuget Fantomas.Client >= 0.9
1616
nuget FSharp.Compiler.Service >= 43.8.200
17-
nuget Ionide.Analyzers 0.7.0
17+
nuget Ionide.Analyzers 0.10.0
1818
nuget FSharp.Analyzers.Build 0.3.0
1919
nuget Ionide.ProjInfo >= 0.62.0
2020
nuget Ionide.ProjInfo.FCS >= 0.62.0

paket.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ NUGET
131131
Microsoft.Win32.Registry (>= 5.0)
132132
System.Collections.Immutable (>= 5.0)
133133
System.Reflection.Metadata (>= 5.0)
134-
Ionide.Analyzers (0.7)
134+
Ionide.Analyzers (0.10)
135135
Ionide.KeepAChangelog.Tasks (0.1.8) - copy_local: true
136136
Ionide.LanguageServerProtocol (0.4.20)
137137
FSharp.Core (>= 6.0)

src/FsAutoComplete.Core/CompilerServiceInterface.fs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,8 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
253253
/// <remarks>Note: all files except the one being checked are read from the FileSystem API</remarks>
254254
/// <returns>Result of ParseAndCheckResults</returns>
255255
member __.ParseAndCheckFileInProject
256-
(
257-
filePath: string<LocalPath>,
258-
version,
259-
source: ISourceText,
260-
options,
261-
?shouldCache: bool
262-
) =
256+
(filePath: string<LocalPath>, version, source: ISourceText, options, ?shouldCache: bool)
257+
=
263258
asyncResult {
264259
let shouldCache = defaultArg shouldCache false
265260
let opName = sprintf "ParseAndCheckFileInProject - %A" filePath
@@ -359,11 +354,8 @@ type FSharpCompilerServiceChecker(hasAnalyzers, typecheckCacheSize, parallelRefe
359354
result
360355

361356
member x.GetUsesOfSymbol
362-
(
363-
file: string<LocalPath>,
364-
options: (string * FSharpProjectOptions) seq,
365-
symbol: FSharpSymbol
366-
) =
357+
(file: string<LocalPath>, options: (string * FSharpProjectOptions) seq, symbol: FSharpSymbol)
358+
=
367359
async {
368360
checkerLogger.info (
369361
Log.setMessage "GetUsesOfSymbol - {file}"

src/FsAutoComplete.Core/FileSystem.fs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,8 @@ module Tokenizer =
585585
///
586586
/// based on: `dotnet/fsharp` `Tokenizer.fixupSpan`
587587
let private tryFixupRangeBySplittingAtDot
588-
(
589-
range: Range,
590-
text: IFSACSourceText,
591-
includeBackticks: bool
592-
) : Range voption =
588+
(range: Range, text: IFSACSourceText, includeBackticks: bool)
589+
: Range voption =
593590
match text[range] with
594591
| Error _ -> ValueNone
595592
| Ok rangeText when rangeText.EndsWith("``", StringComparison.Ordinal) ->
@@ -651,12 +648,8 @@ module Tokenizer =
651648
///
652649
/// returns `None` iff `range` isn't inside `text` -> `range` & `text` for different states
653650
let tryFixupRange
654-
(
655-
symbolNameCore: string,
656-
range: Range,
657-
text: IFSACSourceText,
658-
includeBackticks: bool
659-
) : Range voption =
651+
(symbolNameCore: string, range: Range, text: IFSACSourceText, includeBackticks: bool)
652+
: Range voption =
660653
// first: try match symbolNameCore in last line
661654
// usually identifier cannot contain linebreak -> is in last line of range
662655
// Exception: Active Pattern can span multiple lines: `(|Even|Odd|)` -> `(|Even|\n Odd|)` is valid too

src/FsAutoComplete.Core/InlayHints.fs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -880,12 +880,8 @@ type HintConfig =
880880
ShowParameterHints: bool }
881881

882882
let provideHints
883-
(
884-
text: IFSACSourceText,
885-
parseAndCheck: ParseAndCheckResults,
886-
range: Range,
887-
hintConfig
888-
) : Async<Hint[]> =
883+
(text: IFSACSourceText, parseAndCheck: ParseAndCheckResults, range: Range, hintConfig)
884+
: Async<Hint[]> =
889885
asyncResult {
890886
let! cancellationToken = Async.CancellationToken
891887

src/FsAutoComplete.Core/Lexer.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ module Lexer =
8989
let inline private isPunctuation t = t.ColorClass = FSharpTokenColorKind.Punctuation
9090

9191
let inline private (|GenericTypeParameterPrefix|StaticallyResolvedTypeParameterPrefix|ActivePattern|Other|)
92-
(
93-
(token: FSharpTokenInfo),
94-
(lineStr: string)
95-
) =
92+
((token: FSharpTokenInfo), (lineStr: string))
93+
=
9694
if token.Tag = FSharpTokenTag.QUOTE then
9795
GenericTypeParameterPrefix
9896
elif token.Tag = FSharpTokenTag.INFIX_AT_HAT_OP then

src/FsAutoComplete.Core/ParseAndCheckResults.fsi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ type ParseAndCheckResults =
5454
member TryGetFormattedDocumentation:
5555
pos: Position ->
5656
lineStr: LineStr ->
57-
Result<(ToolTipText option *
58-
(string * string) option *
59-
(string * DocumentationFormatter.EntityInfo) *
60-
string *
61-
string), string>
57+
Result<
58+
(ToolTipText option * (string * string) option * (string * DocumentationFormatter.EntityInfo) * string * string),
59+
string
60+
>
6261

6362
member TryGetFormattedDocumentationForSymbol:
6463
xmlSig: string ->

src/FsAutoComplete.Core/SignatureHelp.fs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@ type SignatureHelpInfo =
2727
}
2828

2929
let private getSignatureHelpForFunctionApplication
30-
(
31-
tyRes: ParseAndCheckResults,
32-
caretPos: Position,
33-
endOfPreviousIdentPos: Position,
34-
lines: IFSACSourceText
35-
) : Async<SignatureHelpInfo option> =
30+
(tyRes: ParseAndCheckResults, caretPos: Position, endOfPreviousIdentPos: Position, lines: IFSACSourceText)
31+
: Async<SignatureHelpInfo option> =
3632
asyncOption {
3733
let! lineStr = lines.GetLine endOfPreviousIdentPos
3834

@@ -124,12 +120,8 @@ let private getSignatureHelpForFunctionApplication
124120
}
125121

126122
let private getSignatureHelpForMethod
127-
(
128-
tyRes: ParseAndCheckResults,
129-
caretPos: Position,
130-
lines: IFSACSourceText,
131-
triggerChar
132-
) =
123+
(tyRes: ParseAndCheckResults, caretPos: Position, lines: IFSACSourceText, triggerChar)
124+
=
133125
asyncOption {
134126
let! paramLocations = tyRes.GetParseResults.FindParameterLocations caretPos
135127
let names = paramLocations.LongId
@@ -213,13 +205,8 @@ let private getSignatureHelpForMethod
213205
}
214206

215207
let getSignatureHelpFor
216-
(
217-
tyRes: ParseAndCheckResults,
218-
pos: Position,
219-
lines: IFSACSourceText,
220-
triggerChar,
221-
possibleSessionKind
222-
) =
208+
(tyRes: ParseAndCheckResults, pos: Position, lines: IFSACSourceText, triggerChar, possibleSessionKind)
209+
=
223210
asyncResult {
224211
let previousNonWhitespaceChar =
225212
let rec loop ch pos =

src/FsAutoComplete.Core/TipFormatter.fsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ val prepareFooterLines: footerText: string -> string array
108108
val tryFormatTipEnhanced:
109109
toolTipText: ToolTipText ->
110110
formatCommentStyle: FormatCommentStyle ->
111-
TipFormatterResult<{| DocComment: string
112-
HasTruncatedExamples: bool |}>
111+
TipFormatterResult<
112+
{| DocComment: string
113+
HasTruncatedExamples: bool |}
114+
>
113115

114116
/// <summary>
115117
/// Generate the 'Show documentation' link for the tooltip.

0 commit comments

Comments
 (0)