From c91f1d6e2f4ebe53ca4eb3d484e609e4617c2313 Mon Sep 17 00:00:00 2001 From: Akeit0 <90429982+Akeit0@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:01:06 +0900 Subject: [PATCH] Fix: Format --- .../AlchemySerializeGenerator.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Alchemy.SourceGenerator/AlchemySerializeGenerator.cs b/Alchemy.SourceGenerator/AlchemySerializeGenerator.cs index eac340a..1f70e14 100644 --- a/Alchemy.SourceGenerator/AlchemySerializeGenerator.cs +++ b/Alchemy.SourceGenerator/AlchemySerializeGenerator.cs @@ -31,15 +31,13 @@ namespace Alchemy.SourceGenerator if (!IsPartial(typeSyntax)) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.MustBePartial, - typeSyntax.Identifier.GetLocation(), typeSymbol.Name)); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.MustBePartial, typeSyntax.Identifier.GetLocation(), typeSymbol.Name)); continue; } if (IsNested(typeSyntax)) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.NestedNotAllow, - typeSyntax.Identifier.GetLocation(), typeSymbol.Name)); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.NestedNotAllow, typeSyntax.Identifier.GetLocation(), typeSymbol.Name)); continue; } @@ -70,9 +68,7 @@ namespace Alchemy.SourceGenerator { if (nonSerializedAttribute == null) { - context.ReportDiagnostic(Diagnostic.Create( - DiagnosticDescriptors.ShouldBeNonSerialized, variable.Identifier.GetLocation(), - fieldSymbol.Name)); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.ShouldBeNonSerialized, variable.Identifier.GetLocation(), fieldSymbol.Name)); } fieldSymbols.Add(fieldSymbol); @@ -91,11 +87,8 @@ namespace Alchemy.SourceGenerator } catch (Exception ex) { - var diagnosticDescriptor = new DiagnosticDescriptor("AlchemySerializeGeneratorError", - "AlchemySerializeGeneratorError", $"Generation failed with:\n {ex}", - "AlchemySerializeGeneratorError", DiagnosticSeverity.Error, true); - context.ReportDiagnostic(Diagnostic.Create(diagnosticDescriptor, Location.None, - DiagnosticSeverity.Error)); + var diagnosticDescriptor = new DiagnosticDescriptor("AlchemySerializeGeneratorError", "AlchemySerializeGeneratorError", $"Generation failed with:\n {ex}", "AlchemySerializeGeneratorError", DiagnosticSeverity.Error, true); + context.ReportDiagnostic(Diagnostic.Create(diagnosticDescriptor, Location.None, DiagnosticSeverity.Error)); } } static string ReplaceGenericsToCount( string typeName,int count)