From ec500fd46b633ee55ef5e2d833fcb3de388f3ec4 Mon Sep 17 00:00:00 2001 From: ijanus Date: Thu, 26 May 2022 13:46:10 +0100 Subject: [PATCH] Returns exception if fsharplint.json is invalid JSON Fixes https://github.com/fsprojects/FSharpLint/issues/550 --- src/FSharpLint.Core/Application/Lint.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FSharpLint.Core/Application/Lint.fs b/src/FSharpLint.Core/Application/Lint.fs index 43d3e80a9..b2686aad8 100644 --- a/src/FSharpLint.Core/Application/Lint.fs +++ b/src/FSharpLint.Core/Application/Lint.fs @@ -385,9 +385,9 @@ module Lint = Configuration.loadConfig "./fsharplint.json" |> Ok with - | ex -> - // TODO: log default config load error + | :? System.IO.FileNotFoundException -> Ok Configuration.defaultConfiguration + | _ as ex -> Error (string ex) /// Lints an entire F# project by retrieving the files from a given /// path to the `.fsproj` file.