Add gitattributes to ensure we do have newlines (#1)

This commit is contained in:
Patrick Stevens
2022-12-01 23:37:09 +00:00
committed by GitHub
parent 753a673b75
commit 89d63b93b0
3 changed files with 4 additions and 5 deletions

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
* text=auto
*.sh text=lf
*.txt text=lf

View File

@@ -2,9 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup>

View File

@@ -11,9 +11,7 @@ module Day1 =
if String.IsNullOrWhiteSpace line then
0, (acc :: counts)
else
match Int32.TryParse line with
| false, _ -> failwithf "not an int: %s" line
| true, v -> acc + v, counts
acc + int line, counts
)
|> snd