Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow splitting GodotDisabledSourceGenerators by comma (Updates ExtensionMethods.cs) #88682

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public static bool IsGodotToolsProject(this GeneratorExecutionContext context)
toggle != null &&
toggle.Equals("true", StringComparison.OrdinalIgnoreCase);

// NOTE: Settings in the editorconfig file (including csproj files) should not use ; as a separator as it will be treated as a comment
public static bool IsGodotSourceGeneratorDisabled(this GeneratorExecutionContext context, string generatorName) =>
AreGodotSourceGeneratorsDisabled(context) ||
(context.TryGetGlobalAnalyzerProperty("GodotDisabledSourceGenerators", out string? disabledGenerators) &&
disabledGenerators != null &&
disabledGenerators.Split(';').Contains(generatorName));
disabledGenerators.Split(';', ',').Contains(generatorName));

public static bool InheritsFrom(this ITypeSymbol? symbol, string assemblyName, string typeFullName)
{
Expand Down
Loading