Skip to content

Commit

Permalink
Merge pull request #134 from nojaf/sarif-folder
Browse files Browse the repository at this point in the history
Create sarif folder if it does not exist
  • Loading branch information
nojaf authored Oct 30, 2023
2 parents 4d5ce26 + 540eae8 commit 79da4aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
5 changes: 4 additions & 1 deletion src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79da4aa

Please sign in to comment.