Skip to content

Commit

Permalink
Add ORLEANS0010 to AnalyzerReleases.Shipped (#8724)
Browse files Browse the repository at this point in the history
* Add ORLEANS0010 to AnalyzerReleases.Shipped

* Add ORLEANS0010 to AnalyzerReleases.Shipped
  • Loading branch information
ReubenBond committed Nov 13, 2023
1 parent f29d7e4 commit 81f74da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Orleans.Analyzers/AnalyzerReleases.Shipped.md
Expand Up @@ -15,11 +15,12 @@ Rule ID | Category | Severity | Notes
ORLEANS0001 | Usage | Error | [AlwaysInterleave] must only be used on the grain interface method and not the grain class method
ORLEANS0002 | Usage | Error | Reference parameter modifiers are not allowed
ORLEANS0004 | Usage | Info | Add serialization [Id] and [NonSerialized] attributes
ORLEANS0005 | Usage | Info | Add [GenerateSerializer] attribute to [Serializable] type.
ORLEANS0005 | Usage | Info | Add [GenerateSerializer] attribute to [Serializable] type
ORLEANS0006 | Usage | Error | Abstract/serialized properties cannot be serialized
ORLEANS0007 | Usage | Error |
ORLEANS0008 | Usage | Error | Grain interfaces cannot have properties
ORLEANS0009 | Usage | Error | Grain interface methods must return a compatible type
ORLEANS0010 | Usage | Info | Add missing [Alias] attribute

### Removed Rules

Expand Down
5 changes: 2 additions & 3 deletions src/Orleans.Analyzers/GenerateAliasAttributesAnalyzer.cs
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;

namespace Orleans.Analyzers;
Expand All @@ -19,7 +18,7 @@ public class GenerateAliasAttributesAnalyzer : DiagnosticAnalyzer
private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(Resources.AddAliasMessageFormat), Resources.ResourceManager, typeof(Resources));
private static readonly LocalizableString Description = new LocalizableResourceString(nameof(Resources.AddAliasAttributesDescription), Resources.ResourceManager, typeof(Resources));

private static readonly DiagnosticDescriptor Rule = new(RuleId, Title, MessageFormat, Category, DiagnosticSeverity.Info, isEnabledByDefault: true, description: Description);
private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(RuleId, Title, MessageFormat, Category, DiagnosticSeverity.Info, isEnabledByDefault: true, description: Description);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

Expand Down Expand Up @@ -67,7 +66,7 @@ private void CheckSyntaxNode(SyntaxNodeAnalysisContext context)
if (!methodDeclaration.HasAttribute(Constants.AliasAttributeName))
{
ReportFor(context, methodDeclaration.GetLocation(), methodDeclaration.Identifier.ToString(), arity: 0, namespaceAndNesting: null);
}
}
}

return;
Expand Down

0 comments on commit 81f74da

Please sign in to comment.