Skip to content

Commit

Permalink
fixed as per comments, fixer now apped Echo2 instead of Echo11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ledjon Behluli authored and Ledjon Behluli committed Oct 21, 2023
1 parent b8f3338 commit 5f60197
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Orleans.Analyzers/AliasClashAttributeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
Expand Down Expand Up @@ -77,6 +78,22 @@ private void CheckSyntaxNode(SyntaxNodeAnalysisContext context)

foreach (var bag in filteredBags)
{
var condition = true;
while (condition)
{
var newAlias = $"{duplicateAlias}{suffix}";
var exists = bags.Any(x => x.Value.Equals(newAlias, StringComparison.Ordinal));

if (exists)
{
suffix++;
}
else
{
condition = false;
}
}

var builder = ImmutableDictionary.CreateBuilder<string, string>();

builder.Add("AliasName", duplicateAlias);
Expand Down

0 comments on commit 5f60197

Please sign in to comment.