Skip to content

Commit

Permalink
Mark logging source generator file as generated (#53275)
Browse files Browse the repository at this point in the history
Give the output file for the M.E.Logging logging classes a ".g" suffix
so that it is treated as a generated file to prevent it being flagged by
source analyzers for violations the application developer cannot fix
for themselves.
  • Loading branch information
martincostello committed Jun 15, 2021
1 parent b21ac01 commit 03b1b38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void Execute(GeneratorExecutionContext context)
var e = new Emitter();
string result = e.Emit(logClasses, context.CancellationToken);

context.AddSource("LoggerMessage", SourceText.From(result, Encoding.UTF8));
context.AddSource("LoggerMessage.g.cs", SourceText.From(result, Encoding.UTF8));
}
}

Expand Down

0 comments on commit 03b1b38

Please sign in to comment.