Skip to content

Commit

Permalink
Merge pull request #2650 from tlakollo/RenameAotProp
Browse files Browse the repository at this point in the history
Rename AOT property to match msbuild camel case
  • Loading branch information
tlakollo authored Feb 24, 2022
2 parents 6a82f4f + 0a4bfcc commit 96c4bfb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ILLink.RoslynAnalyzer/MSBuildPropertyOptionNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public static class MSBuildPropertyOptionNames
public const string EnableSingleFileAnalyzer = nameof (EnableSingleFileAnalyzer);
public const string IncludeAllContentForSelfExtract = nameof (IncludeAllContentForSelfExtract);
public const string EnableTrimAnalyzer = nameof (EnableTrimAnalyzer);
public const string EnableAOTAnalyzer = nameof (EnableAOTAnalyzer);
public const string EnableAotAnalyzer = nameof (EnableAotAnalyzer);
}
}
2 changes: 1 addition & 1 deletion src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed class RequiresDynamicCodeAnalyzer : RequiresAnalyzerBase
private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresDynaicCodeOnStaticCtor;

protected override bool IsAnalyzerEnabled (AnalyzerOptions options, Compilation compilation) =>
options.IsMSBuildPropertyValueTrue (MSBuildPropertyOptionNames.EnableAOTAnalyzer, compilation);
options.IsMSBuildPropertyValueTrue (MSBuildPropertyOptionNames.EnableAotAnalyzer, compilation);

protected override bool VerifyAttributeArguments (AttributeData attribute) =>
attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments[0] is { Type: { SpecialType: SpecialType.System_String } } ctorArg;
Expand Down
2 changes: 1 addition & 1 deletion test/ILLink.RoslynAnalyzer.Tests/LinkerTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public abstract class LinkerTestBase : TestCaseUtils
private static readonly (string, string)[] MSBuildProperties = UseMSBuildProperties (
MSBuildPropertyOptionNames.EnableTrimAnalyzer,
MSBuildPropertyOptionNames.EnableSingleFileAnalyzer,
MSBuildPropertyOptionNames.EnableAOTAnalyzer);
MSBuildPropertyOptionNames.EnableAotAnalyzer);

protected Task RunTest ([CallerMemberName] string testName = "", bool allowMissingWarnings = false)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static Task VerifyRequiresDynamicCodeCodeFix (
test.TestState.AnalyzerConfigFiles.Add (
("/.editorconfig", SourceText.From (@$"
is_global = true
build_property.{MSBuildPropertyOptionNames.EnableAOTAnalyzer} = true")));
build_property.{MSBuildPropertyOptionNames.EnableAotAnalyzer} = true")));
if (numberOfIterations != null) {
test.NumberOfIncrementalIterations = numberOfIterations;
test.NumberOfFixAllIterations = numberOfIterations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static Task VerifyUnconditionalSuppressMessageCodeFixWithRDC (
test.TestState.AnalyzerConfigFiles.Add (
("/.editorconfig", SourceText.From (@$"
is_global = true
build_property.{MSBuildPropertyOptionNames.EnableAOTAnalyzer} = true")));
build_property.{MSBuildPropertyOptionNames.EnableAotAnalyzer} = true")));
test.FixedState.ExpectedDiagnostics.AddRange (fixedExpected);
return test.RunAsync ();
}
Expand Down

0 comments on commit 96c4bfb

Please sign in to comment.