diff --git a/Directory.Packages.props b/Directory.Packages.props index d93eef3..1409d73 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ true - + diff --git a/src/NetEvolve.Arguments.Analyser/ThrowIfNullCodeFixProvider.cs b/src/NetEvolve.Arguments.Analyser/ThrowIfNullCodeFixProvider.cs index 48ff8e7..43e9559 100644 --- a/src/NetEvolve.Arguments.Analyser/ThrowIfNullCodeFixProvider.cs +++ b/src/NetEvolve.Arguments.Analyser/ThrowIfNullCodeFixProvider.cs @@ -147,9 +147,8 @@ semanticModel is null { editor.InsertBefore(containingStatement, throwIfNullStatement); editor.ReplaceNode(coalesce, argument.WithoutTrivia()); - editor.ReplaceNode( - containingStatement, - (currentNode, _) => currentNode.WithLeadingTrivia(SyntaxFactory.ElasticMarker) + editor.ReplaceNode(containingStatement, (currentNode, _) => + currentNode.WithLeadingTrivia(SyntaxFactory.ElasticMarker) ); } else diff --git a/tests/NetEvolve.Arguments.Analyser.Tests.Unit/AnalyzerVerifier.cs b/tests/NetEvolve.Arguments.Analyser.Tests.Unit/AnalyzerVerifier.cs index 239b7ce..3a36c0d 100644 --- a/tests/NetEvolve.Arguments.Analyser.Tests.Unit/AnalyzerVerifier.cs +++ b/tests/NetEvolve.Arguments.Analyser.Tests.Unit/AnalyzerVerifier.cs @@ -209,8 +209,7 @@ private static async Task ApplyFixAllCoreAsync( var equivalenceKey = await GetEquivalenceKeyAsync(document, codeFix, diagnostics[0], cancellationToken) .ConfigureAwait(false); - var fixAllProvider = - codeFix.GetFixAllProvider() + var fixAllProvider = codeFix.GetFixAllProvider() ?? throw new InvalidOperationException("The code fix provider does not support Fix All."); var fixAllContext = new FixAllContext( @@ -223,8 +222,7 @@ private static async Task ApplyFixAllCoreAsync( CancellationToken.None ); - var fixAllAction = - await fixAllProvider.GetFixAsync(fixAllContext).ConfigureAwait(false) + var fixAllAction = await fixAllProvider.GetFixAsync(fixAllContext).ConfigureAwait(false) ?? throw new InvalidOperationException("No Fix All action was registered."); var operations = await fixAllAction.GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);