Skip to content

Commit ca1c491

Browse files
Change NSB0018 saga diagnostic from Info to Error
Co-authored-by: danielmarbach <174258+danielmarbach@users.noreply.github.com>
1 parent 89283e0 commit ca1c491

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/NServiceBus.Core.Analyzer.Tests.Common/Sagas/SagaAnalyzerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace NServiceBus.Core.Analyzer.Tests.Sagas;
1111
public class SagaAnalyzerTests : AnalyzerTestFixture<SagaAnalyzer>
1212
{
1313
[Test]
14-
public Task InfoDiagnosticForSingleOldMapping()
14+
public Task ErrorDiagnosticForSingleOldMapping()
1515
{
1616
var source =
1717
@"using System;

src/NServiceBus.Core.Analyzer/Sagas/SagaDiagnostics.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ static class SagaDiagnostics
132132

133133
public static readonly DiagnosticDescriptor SagaMappingExpressionCanBeRewritten = new(
134134
id: DiagnosticIds.SagaMappingExpressionCanBeRewritten,
135-
title: "Saga mapping expressions can be simplified",
136-
messageFormat: "This saga mapping expression can be rewritten using mapper.MapSaga(…).ToMessage<T>(…) syntax which avoids duplicate .ToSaga(…) expressions.",
135+
title: "Saga mapping expressions must be rewritten",
136+
messageFormat: "This saga mapping expression must be rewritten using mapper.MapSaga(…).ToMessage<T>(…) syntax. Use the code fix to transition to the new syntax.",
137137
category: DiagnosticCategory,
138-
defaultSeverity: DiagnosticSeverity.Info,
138+
defaultSeverity: DiagnosticSeverity.Error,
139139
isEnabledByDefault: true);
140140
}
141141
}

0 commit comments

Comments
 (0)