Skip to content

Commit

Permalink
Suppress IL3050 warnings (#110340)
Browse files Browse the repository at this point in the history
Co-authored-by: Michal Strehovský <[email protected]>
  • Loading branch information
sbomer and MichalStrehovsky authored Dec 3, 2024
1 parent b0f058b commit 87916ee
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace Mono.Linker.Tests.Cases.Reflection
[Reference ("System.Core.dll")]
[ExpectedNoWarnings]
[KeptPrivateImplementationDetails ("ThrowSwitchExpressionException")]
[KeptAttributeAttribute(typeof(UnconditionalSuppressMessageAttribute))]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class ExpressionCallString
{
public static void Main ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
Expand All @@ -7,6 +8,8 @@ namespace Mono.Linker.Tests.Cases.Reflection
{
[Reference ("System.Core.dll")]
[ExpectedNoWarnings]
[KeptAttributeAttribute (typeof (UnconditionalSuppressMessageAttribute))]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class ExpressionCallStringAndLocals
{
public static void Main ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
[SetupLinkAttributesFile ("AddSuppressionsBeforeAttributeRemoval.xml")]

[ExpectedNoWarnings]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class AddSuppressionsBeforeAttributeRemoval
{
[Kept]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
[SetupLinkerArgument ("--feature", "Feature", "false")]
[ExpectedNoWarnings]
[SkipKeptItemsValidation]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class DetectRedundantSuppressionsFeatureSubstitutions
{
public static void Main ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
{
[ExpectedNoWarnings]
[SkipKeptItemsValidation]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class DetectRedundantSuppressionsInMembersAndTypes
{
public static void Main ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
{
[ExpectedNoWarnings]
[SkipKeptItemsValidation]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
class DetectRedundantSuppressionsTrimmedMembersTarget
{
[ExpectedWarning ("IL2072")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
#endif
[SkipKeptItemsValidation]
[LogDoesNotContain ("TriggerUnrecognizedPattern()")]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class SuppressWarningsInMembersAndTypesUsingTarget
{
/// <summary>
Expand Down Expand Up @@ -83,6 +84,7 @@ void Warning4 ()
}

[ExpectedNoWarnings]
[UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")]
public class WarningsInMembers
{
public void Method ()
Expand Down

0 comments on commit 87916ee

Please sign in to comment.