diff --git a/src/FSharp.Analyzers.Cli/Program.fs b/src/FSharp.Analyzers.Cli/Program.fs
index e42885b..8b31207 100644
--- a/src/FSharp.Analyzers.Cli/Program.fs
+++ b/src/FSharp.Analyzers.Cli/Program.fs
@@ -539,15 +539,14 @@ let main argv =
let includeAnalyzers = results.GetResult(<@ Include_Analyzer @>, [])
match excludeAnalyzers, includeAnalyzers with
- | [], [] -> None
- | e, [] -> Some(Exclude(Set.ofList e))
- | [], i -> Some(Include(Set.ofList i))
+ | e, [] -> Exclude(Set.ofList e)
+ | [], i -> Include(Set.ofList i)
| i, _e ->
logger.LogWarning(
"--exclude-analyzers and --include-analyzers are mutually exclusive, ignoring --exclude-analyzers"
)
- Some(Include(Set.ofList i))
+ Include(Set.ofList i)
AssemblyLoadContext.Default.add_Resolving (fun _ctx assemblyName ->
if assemblyName.Name <> "FSharp.Core" then
diff --git a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs
index f54b670..fb04e73 100644
--- a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs
+++ b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs
@@ -139,9 +139,7 @@ type Client<'TAttribute, 'TContext when 'TAttribute :> AnalyzerAttribute and 'TC
new() = Client(Abstractions.NullLogger.Instance)
- member x.LoadAnalyzers(dir: string) : int * int = x.LoadAnalyzers(dir, None)
-
- member x.LoadAnalyzers(dir: string, excludeInclude: ExcludeInclude option) : int * int =
+ member x.LoadAnalyzers(dir: string, ?excludeInclude: ExcludeInclude) : int * int =
if Directory.Exists dir then
let analyzerAssemblies =
let regex = Regex(@".*test.*\.dll$")
diff --git a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fsi b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fsi
index d64e278..b5e5ad7 100644
--- a/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fsi
+++ b/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fsi
@@ -20,16 +20,10 @@ type Client<'TAttribute, 'TContext when 'TAttribute :> AnalyzerAttribute and 'TC
///
/// Loads into private state any analyzers defined in any assembly
/// matching `*Analyzer*.dll` in given directory (and any subdirectories)
+ /// Analyzers are filtered according to the ExcludeInclude set, if provided.
///
/// number of found dlls matching `*Analyzer*.dll` and number of registered analyzers
- member LoadAnalyzers: dir: string -> int * int
- ///
- /// Loads into private state any analyzers defined in any assembly
- /// matching `*Analyzer*.dll` in given directory (and any subdirectories)
- /// Analyzers are filtered according to the given ExcludeInclude set.
- ///
- /// number of found dlls matching `*Analyzer*.dll` and number of registered analyzers
- member LoadAnalyzers: dir: string * excludeInclude: ExcludeInclude option -> int * int
+ member LoadAnalyzers: dir: string * ?excludeInclude: ExcludeInclude -> int * int
/// Runs all registered analyzers for given context (file).
/// list of messages. Ignores errors from the analyzers
member RunAnalyzers: ctx: 'TContext -> Async