Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create sarif folder if it does not exist #134

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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