Skip to content

Commit e4f921a

Browse files
committed
Mark generated code as generated to avoid analyzers working on it
1 parent 0995c9b commit e4f921a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ private void GenerateClass(
306306
string propertyName = null
307307
)
308308
{
309+
var version = typeof(LocalizeSourceGenerator).Assembly.GetName().Version;
309310
sb.AppendLine();
311+
sb.AppendLine($"[System.CodeDom.Compiler.GeneratedCode(\"LocalizeSourceGenerator\", \"{version}\")]");
310312
sb.AppendLine($"public static class {ClassName}");
311313
sb.AppendLine("{");
312314
foreach (var localizedString in localizedStrings)

0 commit comments

Comments
 (0)