Skip to content

Commit

Permalink
Add auto-generated XML header to StronglyTypedSolutionGenerator (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtbuchanan authored and matkoch committed May 6, 2023
1 parent a90504f commit 3d33ebb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//HintName: StronglyTypedSolutionGenerator.cs
/// <auto-generated/>
using Nuke.Common.ProjectModel;

internal class Solution : Nuke.Common.ProjectModel.Solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public void Execute(GeneratorExecutionContext context)
: classDeclaration);
}

var source = compilationUnit.NormalizeWhitespace().ToFullString();
var source = compilationUnit
.WithLeadingTrivia(ParseLeadingTrivia($"/// <auto-generated/>{Environment.NewLine}"))
.NormalizeWhitespace()
.ToFullString();
context.AddSource(nameof(StronglyTypedSolutionGenerator), source);
}

Expand Down

0 comments on commit 3d33ebb

Please sign in to comment.