diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-10-22 23:13:52 +0200 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-10-22 23:13:52 +0200 |
commit | 687633e5bd208e3dfa79d4a26b5dd4b24d53ef0c (patch) | |
tree | 1b6110cb970716e249a5af99de93cf3a25734f36 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs | |
parent | 0b627c413344e27b2581509279c8e7b38ccd108d (diff) | |
download | redot-engine-687633e5bd208e3dfa79d4a26b5dd4b24d53ef0c.tar.gz |
Use `.generated` suffix for generated C# code
Use the `.generated` suffix instead of `_Generated` so .NET marks C#
file generated by Godot source generators as generated code.
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs')
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs index e8a9e28d0c..ccfb405d26 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs @@ -96,8 +96,8 @@ namespace Godot.SourceGenerators string.Empty; bool hasNamespace = classNs.Length != 0; - var uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() - + "_ScriptPath_Generated"; + string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() + + "_ScriptPath.generated"; var source = new StringBuilder(); @@ -126,7 +126,7 @@ namespace Godot.SourceGenerators source.Append("\n}\n"); } - context.AddSource(uniqueHint.ToString(), SourceText.From(source.ToString(), Encoding.UTF8)); + context.AddSource(uniqueHint, SourceText.From(source.ToString(), Encoding.UTF8)); } private static void AddScriptTypesAssemblyAttr(GeneratorExecutionContext context, @@ -157,7 +157,7 @@ namespace Godot.SourceGenerators sourceBuilder.Append("})]\n"); - context.AddSource("AssemblyScriptTypes_Generated", + context.AddSource("AssemblyScriptTypes.generated", SourceText.From(sourceBuilder.ToString(), Encoding.UTF8)); } |