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

Enable concurrent execution #6357

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ public sealed class DoNotUseInsecureXSLTScriptExecutionAnalyzer : DiagnosticAnal

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleDoNotUseInsecureXSLTScriptExecution);

#pragma warning disable RS1026 // Enable concurrent execution
public override void Initialize(AnalysisContext context)
#pragma warning restore RS1026 // Enable concurrent execution
{
//analysisContext.EnableConcurrentExecution();
context.EnableConcurrentExecution();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is safe to enable it now? (The reference in the issue had a comment // TODO: Make analyzer thread-safe. Could not find from history how its removed or who removed it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@buyaa-n I'm not entirely sure tbh. As mentioned in PR description:

Note: I don't see any concurrency issues in the implementation, but this needs to be carefully confirmed.

cc @sharwell


// Security analyzer - analyze and report diagnostics in generated code.
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
Expand Down