Skip to content

Commit

Permalink
support passing of multiple analyzer-path flags on the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
dawedawe committed Oct 30, 2023
1 parent ca492a0 commit 2a35552
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ open Ionide.ProjInfo

type Arguments =
| Project of string list
| [<Unique>] Analyzers_Path of string list
| Analyzers_Path of string list
| [<Unique>] Fail_On_Warnings of string list
| [<Unique>] Treat_As_Info of string list
| [<Unique>] Treat_As_Hint of string list
Expand Down Expand Up @@ -398,7 +398,11 @@ let main argv =
let ignoreFiles = ignoreFiles |> List.map Glob

let analyzersPaths =
results.GetResult(<@ Analyzers_Path @>, [ "packages/Analyzers" ])
results.GetResults(<@ Analyzers_Path @>)
|> List.concat
|> function
| [] -> [ "packages/Analyzers" ]
| paths -> paths
|> List.map (fun path ->
if Path.IsPathRooted path then
path
Expand Down

0 comments on commit 2a35552

Please sign in to comment.