rules_dotnet icon indicating copy to clipboard operation
rules_dotnet copied to clipboard

Support RunAnalyzersDuringBuild=false

Open Place1 opened this issue 1 year ago • 1 comments

Source code analysis can be very slow some large projects; and can effect build memory usage.

It'd be great if it was possible to disable analyzers: https://learn.microsoft.com/en-us/visualstudio/code-quality/disable-code-analysis?view=vs-2022

I'm guessing this would be possible in rules_dotnet by using a config flag to skip adding the /analyzer related flags to csc: https://github.com/bazelbuild/rules_dotnet/blob/master/dotnet/private/rules/csharp/actions/csharp_assembly.bzl#L366-L368

Place1 avatar Mar 22 '23 02:03 Place1

This sounds like an reasonable addition. I think this could be done in the same way as we do some of our other flags.

purkhusid avatar Mar 22 '23 08:03 purkhusid