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 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/") 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