From a0e19ee106de8defa94b37a6227f313664c76962 Mon Sep 17 00:00:00 2001 From: Artem Pyanykh Date: Mon, 18 Nov 2024 00:26:26 +0000 Subject: [PATCH] deps: Remove FSharpLint The project doesn't seem to work with the latest .net9 and is also rarely updated. stack-info: PR: https://github.com/artempyanykh/marksman/pull/358, branch: artempyanykh/stack/9 --- .config/dotnet-tools.json | 6 ------ Makefile | 1 - Marksman/Marksman.fsproj | 7 ------- scripts/silent-lint.fsx | 36 ------------------------------------ 4 files changed, 50 deletions(-) delete mode 100644 scripts/silent-lint.fsx diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index ee9f775..a2a1303 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -7,12 +7,6 @@ "commands": [ "fantomas" ] - }, - "dotnet-fsharplint": { - "version": "0.21.6", - "commands": [ - "dotnet-fsharplint" - ] } } } \ No newline at end of file diff --git a/Makefile b/Makefile index 5622b1d..5ab2612 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,6 @@ setup: .PHONY: check check: setup dotnet fantomas --check Marksman - dotnet fsi scripts/silent-lint.fsx .PHONY: build build: diff --git a/Marksman/Marksman.fsproj b/Marksman/Marksman.fsproj index 077c5bb..d7aa2c9 100644 --- a/Marksman/Marksman.fsproj +++ b/Marksman/Marksman.fsproj @@ -4,7 +4,6 @@ Exe marksman 1.0.0 - false net8.0 @@ -17,12 +16,6 @@ $(VersionPrefix)-$(VersionSuffix) - - - dotnet fsharplint -f msbuild lint --lint-config $(MSBuildProjectDirectory)/../fsharplint.json $(MSBuildProjectFullPath) - - - diff --git a/scripts/silent-lint.fsx b/scripts/silent-lint.fsx deleted file mode 100644 index 1e58768..0000000 --- a/scripts/silent-lint.fsx +++ /dev/null @@ -1,36 +0,0 @@ -#r "nuget: Fake.Core.Process" - -// Run a linter and clean up its output from "Linting: [fname] ... Finished: 0 warnings" - -open System -open Fake.Core - -let junkMarker = "Finished: 0 warnings" - -let rec zipWithNext: 'a list -> ('a * 'a option) list = - function - | [] -> [] - | [ only ] -> [ only, None ] - | fst :: (snd :: _ as tail) -> (fst, Some snd) :: zipWithNext tail - -// Run linter and capture its output -// Would be cool to also preserve colored output, but I don't know how to pretend that the output is a TTY/PTY -// However, the primary use-case is CI, therefore lack of color is not a big issue -let lint = - CreateProcess.fromRawCommand "dotnet" [ "fsharplint"; "lint"; "Marksman/Marksman.fsproj" ] - |> CreateProcess.redirectOutput - |> Proc.run - -if lint.ExitCode <> 0 then - let lines = - lint.Result.Output.Split([| "\n"; "\r\n" |], StringSplitOptions.RemoveEmptyEntries) - |> List.ofArray - - zipWithNext lines - |> List.iter (function - | cur, None -> printfn $"{cur}" - | cur, Some next when not (cur.Contains(junkMarker) || next.Contains(junkMarker)) -> - printfn $"{cur}" - | _ -> ()) - -Environment.Exit(lint.ExitCode)