diff --git a/tests/FSharp.Analyzers.Tests/Common.fs b/tests/FSharp.Analyzers.Tests/Common.fs index d110029..5992942 100644 --- a/tests/FSharp.Analyzers.Tests/Common.fs +++ b/tests/FSharp.Analyzers.Tests/Common.fs @@ -7,6 +7,9 @@ open System.Threading.Tasks open NUnit.Framework open FSharp.Analyzers.SDK +[] +let framework = "net7.0" + let shouldUpdateBaseline () = Environment.GetEnvironmentVariable "TEST_UPDATE_BSL" |> Option.ofObj diff --git a/tests/FSharp.Analyzers.Tests/DisposedBeforeAsyncRunAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/DisposedBeforeAsyncRunAnalyzerTests.fs index 26ce26d..573b0fa 100644 --- a/tests/FSharp.Analyzers.Tests/DisposedBeforeAsyncRunAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/DisposedBeforeAsyncRunAnalyzerTests.fs @@ -13,7 +13,7 @@ let mutable projectOptions : FSharpProjectOptions = FSharpProjectOptions.zero [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/ImmutableCollectionEqualityAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/ImmutableCollectionEqualityAnalyzerTests.fs index f1374c8..9ca06db 100644 --- a/tests/FSharp.Analyzers.Tests/ImmutableCollectionEqualityAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/ImmutableCollectionEqualityAnalyzerTests.fs @@ -13,7 +13,7 @@ let mutable projectOptions : FSharpProjectOptions = FSharpProjectOptions.zero [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/JsonSerializerOptionsAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/JsonSerializerOptionsAnalyzerTests.fs index ed9594c..6cdea69 100644 --- a/tests/FSharp.Analyzers.Tests/JsonSerializerOptionsAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/JsonSerializerOptionsAnalyzerTests.fs @@ -17,7 +17,7 @@ module JsonSerializerOptionsAnalyzerTests = task { let! options = mkOptionsFromProject - "net7.0" + framework [ { Name = "System.Text.Json" diff --git a/tests/FSharp.Analyzers.Tests/LoggingArgFuncNotFullyAppliedAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/LoggingArgFuncNotFullyAppliedAnalyzerTests.fs index 0253e02..b18fa16 100644 --- a/tests/FSharp.Analyzers.Tests/LoggingArgFuncNotFullyAppliedAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/LoggingArgFuncNotFullyAppliedAnalyzerTests.fs @@ -17,7 +17,7 @@ module LoggingArgFuncNotFullyAppliedAnalyzerTests = task { let! options = mkOptionsFromProject - "net7.0" + framework [ { Name = "Microsoft.Extensions.Logging" diff --git a/tests/FSharp.Analyzers.Tests/LoggingTemplateMissingValuesAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/LoggingTemplateMissingValuesAnalyzerTests.fs index 59fa186..2596431 100644 --- a/tests/FSharp.Analyzers.Tests/LoggingTemplateMissingValuesAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/LoggingTemplateMissingValuesAnalyzerTests.fs @@ -17,7 +17,7 @@ module LoggingTemplateMissingValuesAnalyzerTests = task { let! options = mkOptionsFromProject - "net7.0" + framework [ { Name = "Microsoft.Extensions.Logging" diff --git a/tests/FSharp.Analyzers.Tests/StringAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/StringAnalyzerTests.fs index 0acccf6..0f59ce8 100644 --- a/tests/FSharp.Analyzers.Tests/StringAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/StringAnalyzerTests.fs @@ -13,7 +13,7 @@ let mutable projectOptions : FSharpProjectOptions = FSharpProjectOptions.zero [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/TypeAnnotateStringFunctionAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/TypeAnnotateStringFunctionAnalyzerTests.fs index a1bbb5d..3866ffe 100644 --- a/tests/FSharp.Analyzers.Tests/TypeAnnotateStringFunctionAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/TypeAnnotateStringFunctionAnalyzerTests.fs @@ -13,7 +13,7 @@ let mutable projectOptions : FSharpProjectOptions = FSharpProjectOptions.zero [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/TypedInterpolatedStringsAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/TypedInterpolatedStringsAnalyzerTests.fs index 47c6e18..8096027 100644 --- a/tests/FSharp.Analyzers.Tests/TypedInterpolatedStringsAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/TypedInterpolatedStringsAnalyzerTests.fs @@ -13,7 +13,7 @@ let mutable projectOptions : FSharpProjectOptions = FSharpProjectOptions.zero [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/UnionCaseAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/UnionCaseAnalyzerTests.fs index a080dff..56c0353 100644 --- a/tests/FSharp.Analyzers.Tests/UnionCaseAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/UnionCaseAnalyzerTests.fs @@ -15,7 +15,7 @@ module UnionCaseAnalyzerTests = [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options } diff --git a/tests/FSharp.Analyzers.Tests/VirtualCallAnalyzerTests.fs b/tests/FSharp.Analyzers.Tests/VirtualCallAnalyzerTests.fs index 9e236cb..ca5d404 100644 --- a/tests/FSharp.Analyzers.Tests/VirtualCallAnalyzerTests.fs +++ b/tests/FSharp.Analyzers.Tests/VirtualCallAnalyzerTests.fs @@ -15,7 +15,7 @@ module VirtualCallAnalyzerTests = [] let Setup () = task { - let! options = mkOptionsFromProject "net7.0" [] + let! options = mkOptionsFromProject framework [] projectOptions <- options }