Skip to content

Commit

Permalink
#3687 Remove analyzer that checks for the Serializable attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rockfordlhotka committed Apr 24, 2024
1 parent 4f389e7 commit b612630
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
### New Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
CSLA0001 | Usage | Error | IsBusinessObjectSerializableAnalyzer
CSLA0002 | Design | Warning | IsOperationMethodPublicAnalyzer
CSLA0003 | Usage | Error | CheckConstructorsAnalyzer
CSLA0004 | Usage | Warning | CheckConstructorsAnalyzer
Expand Down
1 change: 0 additions & 1 deletion Source/Csla.Analyzers/Csla.Analyzers/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ public static class Constants
{
public static class AnalyzerIdentifiers
{
public const string IsBusinessObjectSerializable = "CSLA0001";
public const string IsOperationMethodPublic = "CSLA0002";
public const string PublicNoArgumentConstructorIsMissing = "CSLA0003";
public const string ConstructorHasParameters = "CSLA0004";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static void AnalyzeMethodDeclaration(SyntaxNodeAnalysisContext context)
!argumentType.IsSerializableByMobileFormatter(context.Compilation) &&
!argument.GetAttributes().Any(_ => _.AttributeClass.IsInjectable()) &&
argumentType is not { ContainingNamespace.Name: "System", Name: "Nullable" } &&
argumentType is INamedTypeSymbol namedArgument && !namedArgument.IsSerializable)
argumentType is INamedTypeSymbol namedArgument)
{
context.ReportDiagnostic(Diagnostic.Create(
shouldUseSerializableTypesRule, argument.Locations[0]));
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b612630

Please sign in to comment.