Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rgen] Set warnings to errors in the transformer tests. #22086

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ interface AVCapturePhotoSettingsThumbnailFormat {
}
";

yield return [(Source: strongDictionary, Path: "/some/random/path.cs"), new StrongDictionaryData ("AVCapturePhotoSettingsThumbnailFormatKeys")];
yield return [(Source: strongDictionary, Path: path), new StrongDictionaryData ("AVCapturePhotoSettingsThumbnailFormatKeys")];
}

IEnumerator IEnumerable.GetEnumerator () => GetEnumerator ();
Original file line number Diff line number Diff line change
@@ -11,6 +11,14 @@
<DotnetBuildDirectory>build/dotnet</DotnetBuildDirectory>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
Comment on lines +14 to +20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea, but we did something like this in Android:

So, we did this across the whole repo for Release builds or CI. There are a few projects with warnings we hope to slowly fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, this project has no warnings atm but we should do something similar if we need to in the other project. I think Rolf and I have all warnings fixed or disabled with pragmas.


<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>