From 7589724251f3f8cf2515bf62e98242c5473a14aa Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Wed, 1 Nov 2023 20:31:12 +0000 Subject: [PATCH 1/2] Build with the .NET 6 SDK --- .github/workflows/build.yml | 2 +- Directory.Build.props | 2 +- global.json | 3 ++- .../Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs | 2 +- .../Rules/Conventions/CyclomaticComplexity.fs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c853e279..fd7f4244a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: - ubuntu-latest - windows-latest - macOS-latest - dotnet: [5.0.202] + dotnet: [5.0.202, 6.0.416] runs-on: ${{ matrix.os }} steps: diff --git a/Directory.Build.props b/Directory.Build.props index 9cb4e26fd..411219c43 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ true - true + false false true true diff --git a/global.json b/global.json index 2d85e8533..1f87612d1 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,6 @@ { "sdk": { - "version": "5.0.202" + "version": "6.0.416", + "rollForward": "patch" } } \ No newline at end of file diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs b/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs index 555589712..23820f375 100644 --- a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs +++ b/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs @@ -116,7 +116,7 @@ let private runner (args: AstNodeRuleParams) = | SynPat.Named (_, id, _, _, _) -> checkExpr app (Some id.idText) | _ -> checkExpr app None) | _ -> Array.empty - | _ -> Array.empty + // | _ -> Array.empty match args.AstNode with | AstNode.Expression expr -> checkExpr expr None diff --git a/tests/FSharpLint.Core.Tests/Rules/Conventions/CyclomaticComplexity.fs b/tests/FSharpLint.Core.Tests/Rules/Conventions/CyclomaticComplexity.fs index a0bab0f0d..b23f81936 100644 --- a/tests/FSharpLint.Core.Tests/Rules/Conventions/CyclomaticComplexity.fs +++ b/tests/FSharpLint.Core.Tests/Rules/Conventions/CyclomaticComplexity.fs @@ -229,7 +229,7 @@ let f() = let code = $"""Module Program let f() = let g() = -{(makeMatchSnippet (MaxComplexity+1)) |> indent 8} + {(makeMatchSnippet (MaxComplexity+1)) |> indent 8} let h() = {makeMatchSnippet MaxComplexity |> indent 8} {makeMatchSnippet (MaxComplexity+1) |> indent 4}""" From b9dbe228897b80c107b2688fac3eefbe5d4e736f Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Wed, 1 Nov 2023 20:51:04 +0000 Subject: [PATCH 2/2] update build.yml --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd7f4244a..5f38a31ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: - ubuntu-latest - windows-latest - macOS-latest - dotnet: [5.0.202, 6.0.416] + dotnet: [5.0.202] runs-on: ${{ matrix.os }} steps: @@ -24,6 +24,10 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.x' - name: Restore tools run: dotnet tool restore - name: Restore dependencies