Skip to content

Commit

Permalink
Apply nit feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
maryamariyan committed Jul 28, 2021
1 parent 88ed19a commit 0e517e5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Analyzer.Utilities;
using Analyzer.Utilities.Extensions;
Expand Down Expand Up @@ -123,7 +124,7 @@ private void AnalyzeInvocation(OperationAnalysisContext context, INamedTypeSymbo
var containingType = methodSymbol.ContainingType;
bool usingLoggerExtensionsTypes = false;

if (containingType.Equals(loggerExtensionsType, SymbolEqualityComparer.Default)) // the condition I want
if (containingType.Equals(loggerExtensionsType, SymbolEqualityComparer.Default))
{
usingLoggerExtensionsTypes = true;
context.ReportDiagnostic(invocation.CreateDiagnostic(CA1848Rule, methodSymbol.ToDisplayString(GetLanguageSpecificFormat(invocation)), methodSymbol.Name));
Expand Down Expand Up @@ -163,7 +164,7 @@ private void AnalyzeInvocation(OperationAnalysisContext context, INamedTypeSymbo
}
else if (parameter.Equals(paramsArgument, SymbolEqualityComparer.Default))
{
var parameterType = argument.Parameter.Type;// TODO test
var parameterType = argument.Parameter.Type;
if (parameterType == null)
{
return;
Expand Down Expand Up @@ -289,7 +290,7 @@ private static SymbolDisplayFormat GetLanguageSpecificFormat(IOperation operatio
}
}

private static bool FindLogParameters(IMethodSymbol methodSymbol, out IParameterSymbol? message, out IParameterSymbol? arguments)
private static bool FindLogParameters(IMethodSymbol methodSymbol, [NotNullWhen(true)] out IParameterSymbol? message, out IParameterSymbol? arguments)
{
message = null;
arguments = null;
Expand Down

0 comments on commit 0e517e5

Please sign in to comment.