Skip to content

Commit

Permalink
2024: Introduce fantomas
Browse files Browse the repository at this point in the history
  • Loading branch information
jp7677 committed Nov 16, 2024
1 parent f93d11b commit 6091d1c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
run: |
cd 2024
dotnet tool restore
dotnet fantomas --check src/*
DOTNET_ROLL_FORWARD=latestMajor dotnet fsharplint lint src/*
dotnet build -c Release
dotnet test bin/Release/net8.0/aoc2024.dll
6 changes: 6 additions & 0 deletions 2024/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"commands": [
"dotnet-fsharplint"
]
},
"fantomas": {
"version": "6.3.16",
"commands": [
"fantomas"
]
}
}
}
14 changes: 14 additions & 0 deletions 2024/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
max_line_length = 120
indent_style = space
indent_size = 4

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{fs,fsx}]
fsharp_max_value_binding_width = 120
2 changes: 1 addition & 1 deletion 2024/src/Day00.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ open Util
module Day00 =

[<Fact>]
let ``part 01``() =
let ``part 01`` () =
input "day00-input.txt" |> Seq.head |> int |> should equal 0
4 changes: 2 additions & 2 deletions 2024/src/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ open System

module Util =

let input(name: string) =
let input (name: string) =
let path = $"{Reflection.Assembly.GetExecutingAssembly().Location}/../../../../data/{name}"
seq { yield! IO.File.ReadLines path }
seq { yield! IO.File.ReadLines path }

0 comments on commit 6091d1c

Please sign in to comment.