Skip to content

Commit 5066805

Browse files
committed
Core,Tests: respect .NET API conventions
Suffix "Async" for methods is for methods that return "Task<Foo>", not "Async<Foo". For more info, see the PR for an upcoming FSharpLint rule: #586
1 parent 5078119 commit 5066805

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/FSharpLint.Core/Application/Lint.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ module Lint =
585585
LintResult.Failure (RunTimeConfigError err)
586586

587587
/// Lints F# source code.
588-
let lintSourceAsync optionalParams source =
588+
let asyncLintSource optionalParams source =
589589
async {
590590
let checker = FSharpChecker.Create(keepAssemblyContents=true)
591591

@@ -602,7 +602,7 @@ module Lint =
602602

603603
/// Lints F# source code.
604604
let lintSource optionalParams source =
605-
lintSourceAsync optionalParams source |> Async.RunSynchronously
605+
asyncLintSource optionalParams source |> Async.RunSynchronously
606606

607607
/// Lints an F# file that has already been parsed using `FSharp.Compiler.Services` in the calling application.
608608
let lintParsedFile (optionalParams:OptionalLintParameters) (parsedFileInfo:ParsedFileInformation) (filePath:string) =

src/FSharpLint.Core/Application/Lint.fsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ module Lint =
157157
val lintSource : optionalParams:OptionalLintParameters -> source:string -> LintResult
158158

159159
/// Lints F# source code async.
160-
val lintSourceAsync : optionalParams:OptionalLintParameters -> source:string -> Async<LintResult>
160+
val asyncLintSource : optionalParams:OptionalLintParameters -> source:string -> Async<LintResult>
161161

162162
/// Lints F# source code that has already been parsed using
163163
/// `FSharp.Compiler.Services` in the calling application.
@@ -171,4 +171,4 @@ module Lint =
171171

172172
/// Lints an F# file that has already been parsed using
173173
/// `FSharp.Compiler.Services` in the calling application.
174-
val lintParsedFile : optionalParams:OptionalLintParameters -> parsedFileInfo:ParsedFileInformation -> filePath:string -> LintResult
174+
val lintParsedFile : optionalParams:OptionalLintParameters -> parsedFileInfo:ParsedFileInformation -> filePath:string -> LintResult

tests/FSharpLint.Core.Tests/TestUtils.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
let private performanceTestSourceFile = basePath </> "TypeChecker.fs"
1717

18-
let generateAstAsync source =
18+
let asyncGenerateAst source =
1919
async {
2020
let checker = FSharpChecker.Create(keepAssemblyContents=true)
2121
let sourceText = SourceText.ofString source
@@ -30,7 +30,7 @@
3030
}
3131

3232
let generateAst source =
33-
generateAstAsync source |> Async.RunSynchronously
33+
asyncGenerateAst source |> Async.RunSynchronously
3434

3535
let getPerformanceTestInput =
3636
let memoizedResult = ref None

0 commit comments

Comments
 (0)