diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index f5827b7..288d306 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "fantomas": { - "version": "5.2.0-alpha-010", + "version": "6.3.0-alpha-005", "commands": [ "fantomas" ] diff --git a/.editorconfig b/.editorconfig index 032150c..9ef5fed 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,6 +2,7 @@ root=true [*] charset=utf-8 +end_of_line=crlf trim_trailing_whitespace=true insert_final_newline=true indent_style=space @@ -23,7 +24,7 @@ fsharp_space_before_class_constructor=true fsharp_space_before_member=true fsharp_space_before_colon=true fsharp_space_before_semicolon=true -fsharp_multiline_block_brackets_on_same_column=true +fsharp_multiline_bracket_style=aligned fsharp_newline_between_type_definition_and_members=true fsharp_align_function_signature_to_indentation=true fsharp_alternative_long_member_definitions=true diff --git a/.fantomasignore b/.fantomasignore new file mode 100644 index 0000000..9b42106 --- /dev/null +++ b/.fantomasignore @@ -0,0 +1 @@ +.direnv/ diff --git a/PulumiWebServer.Test/PulumiWebServer.Test.fsproj b/PulumiWebServer.Test/PulumiWebServer.Test.fsproj index 24ed856..7ac4e3f 100644 --- a/PulumiWebServer.Test/PulumiWebServer.Test.fsproj +++ b/PulumiWebServer.Test/PulumiWebServer.Test.fsproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/PulumiWebServer.Test/Utils.fs b/PulumiWebServer.Test/Utils.fs index e209b9d..aacdf00 100644 --- a/PulumiWebServer.Test/Utils.fs +++ b/PulumiWebServer.Test/Utils.fs @@ -5,9 +5,7 @@ open System.IO [] module Utils = - type Dummy = - class - end + type Dummy = class end let rec findFileAbove (fileName : string) (di : DirectoryInfo) = if isNull di then diff --git a/flake.lock b/flake.lock index 46b28fe..5b4c88d 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703438236, - "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=", + "lastModified": 1703637592, + "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b", + "rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index dd1548d..a845965 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,8 @@ projectFile = "./PulumiWebServer/PulumiWebServer.fsproj"; testProjectFile = "./PulumiWebServer.Test/PulumiWebServer.Test.fsproj"; pname = "PulumiWebServer"; - dotnet-sdk = pkgs.dotnet-sdk_7; - dotnet-runtime = pkgs.dotnetCorePackages.runtime_7_0; + dotnet-sdk = pkgs.dotnet-sdk_8; + dotnet-runtime = pkgs.dotnetCorePackages.runtime_8_0; version = "0.0.1"; dotnetTool = toolName: toolVersion: sha256: pkgs.stdenvNoCC.mkDerivation rec { @@ -40,7 +40,7 @@ }; in { packages = { - fantomas = dotnetTool "fantomas" "5.2.0-alpha-010" "sha256-CuoROZBBhaK0IFjbKNLvzgX4GXwuIybqIvCtuqROBMk="; + fantomas = dotnetTool "fantomas" (builtins.fromJSON (builtins.readFile ./.config/dotnet-tools.json)).tools.fantomas.version "sha256-Jmo7s8JMdQ8SxvNvPnryfE7n24mIgKi5cbgNwcQw3yU="; fetchDeps = let flags = []; runtimeIds = map (system: pkgs.dotnetCorePackages.systemToDotnetRid system) dotnet-sdk.meta.platforms; @@ -71,7 +71,7 @@ }; }; devShells = let - requirements = [pkgs.dotnet-sdk_7 pkgs.git pkgs.alejandra pkgs.nodePackages.markdown-link-check pkgs.jq]; + requirements = [pkgs.dotnet-sdk_8 pkgs.git pkgs.alejandra pkgs.nodePackages.markdown-link-check pkgs.jq]; in { default = pkgs.mkShell { buildInputs = diff --git a/hooks/pre-push b/hooks/pre-push index 280e8c8..a99c1b4 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -3,9 +3,9 @@ import subprocess def check_fantomas(): - result = subprocess.run(["dotnet", "tool", "run", "fantomas", "--check", "-r", "."]) + result = subprocess.run(["dotnet", "tool", "run", "fantomas", "--check", "."]) if result.returncode != 0: - raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet tool run fantomas -r .`") + raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet tool run fantomas .`") def main():