fix: Fixes sourcegen spacing (#766)

This commit is contained in:
Kamron Batman 2021-09-05 13:18:31 -07:00 committed by GitHub
parent 04b5a6c609
commit 21aa6aaade
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 8 deletions

View file

@ -225,12 +225,12 @@ namespace SerializationGenerator
if (attrTypeArg.Kind == TypedConstantKind.Primitive && attrTypeArg.Value is string attrStr)
{
source.AppendLine($"{indent} {attrStr}");
source.AppendLine($"{indent}{attrStr}");
}
else
{
var attrType = (ITypeSymbol)attrTypeArg.Value;
source.GenerateAttribute(attrType?.Name, ctorArgs[1].Values);
source.GenerateAttribute(indent, attrType?.Name, ctorArgs[1].Values);
}
}
@ -245,6 +245,7 @@ namespace SerializationGenerator
{
source.GenerateSerializableProperty(
compilation,
indent,
fieldSymbol,
getterAccessor,
setterAccessor,
@ -357,7 +358,7 @@ namespace SerializationGenerator
int index = 0;
foreach (var (order, _) in serializableFieldSaveFlags)
{
source.GenerateEnumValue($"{indent} ", true, serializableProperties[order].Name, index++);
source.GenerateEnumValue($"{indent} ", true, serializableProperties[order].Name, index++);
}
source.GenerateEnumEnd($"{indent} ");