Skip to content

Commit

Permalink
Merge pull request #505 from StefanMaron/development
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
Arthurvdv authored Jan 12, 2024
2 parents 4e2a563 + 68aeabe commit cc23f14
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ private void CheckForObjectIdsInFunctionInvocations(OperationAnalysisContext con
{
if (operation.TargetMethod.Parameters[0].ParameterType.NavTypeKind == NavTypeKind.Integer)
{
int tempint = 0;
if (int.TryParse(operation.Arguments[0].Syntax.ToString(), out tempint))
context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0012DoNotUseObjectIdInSystemFunctions, context.Operation.Syntax.GetLocation(), new object[] { "CurrentFunction.CorrectAccessSymbol", "" }));
if (int.TryParse(operation.Arguments[0].Syntax.ToString(), out int tempint))
context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0012DoNotUseObjectIdInSystemFunctions, context.Operation.Syntax.GetLocation(), new object[] { CurrentFunction.CorrectAccessSymbol, "" }));
else
if (!operation.Arguments[0].Syntax.ToString().ToUpper().StartsWith(CurrentFunction.CorrectAccessSymbol.ToUpper()))
context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0012DoNotUseObjectIdInSystemFunctions, context.Operation.Syntax.GetLocation(), new object[] { "CurrentFunction.CorrectAccessSymbol", "" }));
context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0012DoNotUseObjectIdInSystemFunctions, context.Operation.Syntax.GetLocation(), new object[] { CurrentFunction.CorrectAccessSymbol, "" }));
}
}
}
Expand Down

0 comments on commit cc23f14

Please sign in to comment.