Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Fantomas to 7.0.1 and temporarily ignore FsUnit.xUnit #329

Merged
merged 8 commits into from
Mar 1, 2025
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rollForward": false
},
"fantomas": {
"version": "7.0.0",
"version": "7.0.1",
"commands": [
"fantomas"
],
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ updates:
- "version-update:semver-major"
- "version-update:semver-minor"
- "version-update:semver-patch"
# NOTE: FsUnit.xUnit 7.x depends on xUnit 3.x, however, xUnit 3.x is not yet compatible with FsCheck.
- dependency-name: "FsUnit.xUnit"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- "version-update:semver-patch"
- dependency-name: "PowerShellStandard.Library"
update-types:
- "version-update:semver-major"
Expand Down
7 changes: 4 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
// TODO: pin sdk version to 9.0.103 to prevent `dotnet tool restore` failure on MacOS due to `NU3018`, `NU3037` and `NU3028`.
"sdk": {
"rollForward": "latestMinor",
"version": "9.0.101"
"rollForward": "disable",
"version": "9.0.103"
}
}
}
2 changes: 1 addition & 1 deletion psakefile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Task Lint {
# if (-not $?) {
# throw 'dotnet fsharplint failed.'
# }
dotnet fantomas ./src --check
dotnet fantomas ./src --check --verbosity detailed
if (-not $?) {
throw 'dotnet fantomas failed.'
}
Expand Down
6 changes: 4 additions & 2 deletions src/pocof.Test/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ module Mock =
let mutable errors: ErrorRecord list = List.empty
let mutable warnings: string list = List.empty

let write obj =
output <- (nullArgCheck "obj" (obj.ToString())) :: output
let write (obj: obj | null) =
match obj with
| null -> failwith "null"
| obj -> output <- (nullArgCheck "obj" (obj.ToString())) :: output

member __.Output = output
member __.Errors = errors
Expand Down
2 changes: 1 addition & 1 deletion src/pocof/Data.fs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module Data =
| Entry.Dict dct -> dct
| Entry.Obj o -> o)

let generateDictOfEnum<'ENUM> () =
let generateDictOfEnum<'ENUM when 'ENUM :> Enum> () =
let dict = Generic.Dictionary<string, 'ENUM>(StringComparer.OrdinalIgnoreCase)

Enum.GetValues typeof<'ENUM> :?> 'ENUM array
Expand Down
2 changes: 2 additions & 0 deletions src/pocof/Query.fs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// NOTE: to avoid nullness warning from LeafExpressionConverter.EvaluateQuotation in unreachable pass.
#nowarn 3264
namespace Pocof

open FSharp.Linq.RuntimeHelpers
Expand Down