mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00
Suppress RS1041 analyzer rule (#97374)
* Suppress RS1041 analyzer rule * Update JsonSourceGenerator.Roslyn4.0.cs * Update Generator.cs
This commit is contained in:
parent
0add014045
commit
648b3ebc64
3 changed files with 4 additions and 4 deletions
|
@ -3,6 +3,10 @@
|
|||
<PropertyGroup>
|
||||
<GeneratorProjectBaseTargetPath>analyzers/dotnet</GeneratorProjectBaseTargetPath>
|
||||
<GeneratorProjectBaseTargetPath Condition="'$(AnalyzerLanguage)' != ''">$(GeneratorProjectBaseTargetPath)/$(AnalyzerLanguage)</GeneratorProjectBaseTargetPath>
|
||||
|
||||
<!-- RS1041: Compiler extensions should be implemented in assemblies targeting netstandard2.0.
|
||||
Runtime intentionally targets .NETCoreApp for nullable annotation warnings without shipping. -->
|
||||
<NoWarn Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">$(NoWarn);RS1041</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
|
|
|
@ -12,9 +12,7 @@ using Microsoft.CodeAnalysis.Text;
|
|||
|
||||
namespace Microsoft.Extensions.Options.Generators
|
||||
{
|
||||
#pragma warning disable RS1041 // we're multi-targeting so this is fine
|
||||
[Generator]
|
||||
#pragma warning restore
|
||||
public class OptionsValidatorGenerator : IIncrementalGenerator
|
||||
{
|
||||
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||
|
|
|
@ -16,9 +16,7 @@ namespace System.Text.Json.SourceGeneration
|
|||
/// <summary>
|
||||
/// Generates source code to optimize serialization and deserialization with JsonSerializer.
|
||||
/// </summary>
|
||||
#pragma warning disable RS1041 // we're multi-targeting so this is fine
|
||||
[Generator]
|
||||
#pragma warning restore
|
||||
public sealed partial class JsonSourceGenerator : IIncrementalGenerator
|
||||
{
|
||||
#if ROSLYN4_4_OR_GREATER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue