diff --git a/src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs b/src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs index 9a01560..a698c70 100644 --- a/src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs +++ b/src/Elastic.Markdown/Diagnostics/DiagnosticsChannel.cs @@ -77,10 +77,10 @@ public class DiagnosticsCollector(ILoggerFactory loggerFactory, IReadOnlyCollect public DiagnosticsChannel Channel { get; } = new(); - private long _errors; - private long _warnings; - public long Warnings => _warnings; - public long Errors => _errors; + private int _errors; + private int _warnings; + public int Warnings => _warnings; + public int Errors => _errors; private Task? _started; diff --git a/src/docs-builder/Cli/Commands.cs b/src/docs-builder/Cli/Commands.cs index 1ad119d..35eef9f 100644 --- a/src/docs-builder/Cli/Commands.cs +++ b/src/docs-builder/Cli/Commands.cs @@ -60,7 +60,7 @@ public async Task Generate( var set = new DocumentationSet(context); var generator = new DocumentationGenerator(set, logger); await generator.GenerateAll(ctx); - return context.Collector.Errors > 1 ? 1 : 0; + return context.Collector.Errors + context.Collector.Warnings; } ///