Skip to content

Commit

Permalink
Merge branch 'master' into hint-as-note
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Nov 9, 2023
2 parents 74f9db6 + 80e6f0b commit ba3f029
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"fsdocs-tool": {
"version": "20.0.0-alpha-002",
"version": "20.0.0-alpha-005",
"commands": [
"fsdocs"
]
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +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).

## Unreleased
## [Unreleased]

### Fixed
* [--project value should be tested if path exists](https://github.com/ionide/FSharp.Analyzers.SDK/issues/141) (thanks @dawedawe!)
* [Provide better DX when project cracking failed](https://github.com/ionide/FSharp.Analyzers.SDK/issues/126) (thanks @dawedawe!)
* [Hint is mapped as note in sarif export](https://github.com/ionide/FSharp.Analyzers.SDK/pull/148) (thanks @nojaf!)

## [0.19.0] - 2023-11-08
Expand Down
22 changes: 10 additions & 12 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ let loadProject toolsPath projPath =
async {
let loader = WorkspaceLoader.Create(toolsPath)
let parsed = loader.LoadProjects [ projPath ] |> Seq.toList

if parsed.IsEmpty then
printError $"Failed to load project '{projPath}'"
exit 1

let fcsPo = FCS.mapToFSharpProjectOptions parsed.Head parsed

return fcsPo
Expand Down Expand Up @@ -449,20 +454,13 @@ let main argv =
exit 1
| [], Some fscArgs -> runFscArgs client fscArgs ignoreFiles severityMapping |> Async.RunSynchronously
| projects, None ->
let runProj (proj: string) =
async {
let project =
if Path.IsPathRooted proj then
proj
else
Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, proj))

let! results = runProject client toolsPath project ignoreFiles severityMapping
return results
}
for projPath in projects do
if not (File.Exists(projPath)) then
printError $"Invalid `--project` argument. File does not exist: '{projPath}'"
exit 1

projects
|> List.map runProj
|> List.map (fun projPath -> runProject client toolsPath projPath ignoreFiles severityMapping)
|> Async.Sequential
|> Async.RunSynchronously
|> Array.choose id
Expand Down

0 comments on commit ba3f029

Please sign in to comment.