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

CA2022 errors #13361

Closed
NikolaMilosavljevic opened this issue Mar 29, 2024 · 1 comment · Fixed by NuGet/NuGet.Client#5738
Closed

CA2022 errors #13361

NikolaMilosavljevic opened this issue Mar 29, 2024 · 1 comment · Fixed by NuGet/NuGet.Client#5738
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Type:Engineering product/infrastructure work/not a customer bug/feature/DCR
Milestone

Comments

@NikolaMilosavljevic
Copy link

NikolaMilosavljevic commented Mar 29, 2024

New SDK introduces new warnings that turn into errors in VMR build - see dotnet/installer#19145 (comment)

/vmr/src/nuget-client/src/NuGet.Core/NuGet.Packaging/Signing/Archive/SignedPackageArchiveUtility.cs(107,13): error CA2022: Avoid inexact read with 'System.IO.Stream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/vmr/src/nuget-client/src/NuGet.Core/NuGet.Packaging/NuGet.Packaging.csproj::TargetFramework=net9.0]
/vmr/src/nuget-client/src/NuGet.Core/NuGet.ProjectModel/Utf8JsonStreamReader.cs(55,13): error CA2022: Avoid inexact read with 'System.IO.Stream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/vmr/src/nuget-client/src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj::TargetFramework=net9.0]

I'm going to patch to disable this warning, in VMR builds. However this needs to be properly fixed.

@NikolaMilosavljevic NikolaMilosavljevic changed the title CA2022 error in src/NuGet.Core/NuGet.Packaging/Signing/Archive/SignedPackageArchiveUtility.cs CA2022 errors Mar 30, 2024
Copy link
Contributor

Issue is missing Type label, remember to add a Type label

@dotnet-policy-service dotnet-policy-service bot added the missing-required-type The required type label is missing. label Mar 30, 2024
@nkolev92 nkolev92 added Priority:2 Issues for the current backlog. Type:Engineering product/infrastructure work/not a customer bug/feature/DCR labels Apr 1, 2024
@dotnet-policy-service dotnet-policy-service bot removed missing-required-type The required type label is missing. labels Apr 1, 2024
@nkolev92 nkolev92 added the Category:Quality Week Issues that should be considered for quality week label Apr 1, 2024
@martinrrm martinrrm added this to the 6.11 milestone Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Type:Engineering product/infrastructure work/not a customer bug/feature/DCR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants