From 60cce82df6b55a4f4dc27e3644eef470c452496b Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 30 Oct 2023 09:45:04 +0100 Subject: [PATCH 1/3] Ensure report file directory is created. --- src/FSharp.Analyzers.Cli/Program.fs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/FSharp.Analyzers.Cli/Program.fs b/src/FSharp.Analyzers.Cli/Program.fs index 55ed91f..e33b74a 100644 --- a/src/FSharp.Analyzers.Cli/Program.fs +++ b/src/FSharp.Analyzers.Cli/Program.fs @@ -194,6 +194,12 @@ let printMessages failOnWarnings (msgs: AnalyzerMessage list) = let writeReport (results: AnalyzerMessage list option) (report: string) = try + // Construct full path to ensure path separators are normalized. + let report = Path.GetFullPath report + // Ensure the parent directory exists + let reportFile = FileInfo(report) + reportFile.Directory.Create() + let driver = ToolComponent() driver.Name <- "Ionide.Analyzers.Cli" driver.InformationUri <- Uri("https://ionide.io/FSharp.Analyzers.SDK/") From f1d8eab4597c5da01bff308ff88a87b94b9a4fd3 Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 30 Oct 2023 09:45:31 +0100 Subject: [PATCH 2/3] Only assert major and minor version align. --- src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs index 05792ef..8e5fa24 100644 --- a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs +++ b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs @@ -186,7 +186,10 @@ type Client<'TAttribute, 'TContext when 'TAttribute :> AnalyzerAttribute and 'TC |> Array.filter (fun (name, analyzerAssembly) -> let version = findFSharpAnalyzerSDKVersion analyzerAssembly - if version = Utils.currentFSharpAnalyzersSDKVersion then + if + version.Major = Utils.currentFSharpAnalyzersSDKVersion.Major + && version.Minor = Utils.currentFSharpAnalyzersSDKVersion.Minor + then true else logger.Error From 540eae8a71c7b56c031b46c9302ad1ad077fcc7f Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 30 Oct 2023 09:47:29 +0100 Subject: [PATCH 3/3] Add changelog entry. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf18c43..25d21dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.17.1] - 2023-10-30 + +### Fixed +* [Create sarif folder if it does not exist](https://github.com/ionide/FSharp.Analyzers.SDK/issues/132) (thanks @nojaf!) + ## [0.17.0] - 2023-10-26 ### Changed