Skip to content

Commit 1763d39

Browse files
committed
chore: added auto generated comment to using alias generator
1 parent f011509 commit 1763d39

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/generators/SourceKit.Generators.Grpc/Builders/UsingBuilders/AutoGeneratedCommentBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public UsingDirectiveSyntax Process(
1515
{
1616
const string comment = """
1717
// <auto-generated>
18-
// This code was generated by a SourceKit.Generators.Grpc code generator.
19-
// https://github.com/itmo-is-dev/SourceKit
18+
// This code was generated by a SourceKit.Generators.Grpc code generator.
19+
// https://github.com/itmo-is-dev/SourceKit
2020
// </auto-generated>
2121
""";
2222

src/generators/SourceKit.Generators.Grpc/Generators/ProtoMessageAliasGenerator.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ public void Execute(GeneratorExecutionContext context)
3131
CompilationUnitSyntax unit = CompilationUnit().AddUsings(directives).NormalizeWhitespace(eol: "\n");
3232
string text = unit.ToFullString();
3333

34+
text = $"""
35+
// <auto-generated>
36+
// This code was generated by a SourceKit.Generators.Grpc code generator.
37+
// https://github.com/itmo-is-dev/SourceKit
38+
// </auto-generated>
39+
40+
{text}
41+
""";
42+
3443
context.AddSource("SourceKit.Generators.Builder.ProtoAlias.cs", text);
3544
}
3645

@@ -40,4 +49,4 @@ private static UsingDirectiveSyntax GenerateAlias(INamedTypeSymbol symbol)
4049
.WithGlobalKeyword(Token(SyntaxKind.GlobalKeyword))
4150
.WithAlias(NameEquals(IdentifierName($"Proto{symbol.Name}")));
4251
}
43-
}
52+
}

0 commit comments

Comments
 (0)