From 4e694526d97ee32d282bfca9b87139079d36042f Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 24 Oct 2025 05:10:29 +0100 Subject: [PATCH] Enable CA2022: Avoid inexact read with 'Stream.Read' (#25814) --- .globalconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.globalconfig b/.globalconfig index ed1d6c1a33..7395d94ea6 100644 --- a/.globalconfig +++ b/.globalconfig @@ -574,6 +574,10 @@ dotnet_diagnostic.CA2016.severity = suggestion # https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2021 dotnet_diagnostic.CA2021.severity = warning +# CA2022: Avoid inexact read with 'Stream.Read' +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022 +dotnet_diagnostic.CA2022.severity = warning + # CA2100: Review SQL queries for security vulnerabilities # https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2100 dotnet_diagnostic.CA2100.severity = none