1
0
Fork 0
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:
Viktor Hofer 2024-01-23 14:27:29 +01:00 committed by GitHub
parent 0add014045
commit 648b3ebc64
Signed by: github
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -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>

View file

@ -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)

View file

@ -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