mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Add fine-grained disabling of SourceGenerators
This allows manual testing and/or alternate source generators to provide functionality without conflict.
This commit is contained in:
parent
0291fcd7b6
commit
8ab3295e57
9 changed files with 14 additions and 7 deletions
|
|
@ -26,6 +26,12 @@ namespace Godot.SourceGenerators
|
|||
toggle != null &&
|
||||
toggle.Equals("true", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static bool IsGodotSourceGeneratorDisabled(this GeneratorExecutionContext context, string generatorName) =>
|
||||
AreGodotSourceGeneratorsDisabled(context) ||
|
||||
(context.TryGetGlobalAnalyzerProperty("GodotDisabledSourceGenerators", out string? disabledGenerators) &&
|
||||
disabledGenerators != null &&
|
||||
disabledGenerators.Split(';').Contains(generatorName));
|
||||
|
||||
public static bool InheritsFrom(this INamedTypeSymbol? symbol, string assemblyName, string typeFullName)
|
||||
{
|
||||
while (symbol != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue