Commit Graph

34 Commits

Author SHA1 Message Date
Mario Pistrich 83b0d939be
Fix CA2022 warnings (Avoid inexact read with 'Stream.Read') (#100352)
* Configure CA2022 severity

* Fix CA2022 warnings

* Check for NET7_0_OR_GREATER before using ReadExactly

* Fix CS1503

* Formatting

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Buyaa Namnan <bunamnan@microsoft.com>
2024-03-28 17:05:34 -07:00
Stephen Toub c659c6e511
Update CodeAnalysis config with recent rules (#100146) 2024-03-25 08:46:15 -04:00
Buyaa Namnan c6906ae608
Update dependencies from dotnet/roslyn-analyzers, config new analyzers (#99343)
* Reapply "[main] Update dependencies from dotnet/roslyn-analyzers (#98984)" (#99327)

* Configure new analyzers severity in src and test projects

* Fix some of CA2263 warnings
2024-03-07 13:48:04 -08:00
dotnet-maestro[bot] bf547c68ee
[main] Update dependencies from 10 repositories (#92881)
* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/runtime build 20231002.2

Microsoft.DotNet.ILCompiler , Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 9.0.0-alpha.1.23470.17 -> To Version 9.0.0-alpha.1.23502.2

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230925.1

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.23472.1 -> To Version 9.0.0-alpha.1.23475.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231002.8

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23502.8

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231003.9

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23503.9

* Update dependencies from https://github.com/dotnet/arcade build 20231004.4

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23504.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/emsdk build 20231004.5

Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport
 From Version 9.0.0-alpha.1.23478.1 -> To Version 9.0.0-alpha.1.23504.5

Dependency coherency updates

runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 16.0.5-alpha.1.23472.1 -> To Version 16.0.5-alpha.1.23477.2 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231004.15

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23504.15

* Update dependencies from https://github.com/dotnet/arcade build 20231006.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23506.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/xharness build 20231005.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23477.1 -> To Version 8.0.0-prerelease.23505.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/emsdk build 20231004.5

Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport
 From Version 9.0.0-alpha.1.23478.1 -> To Version 9.0.0-alpha.1.23504.5

Dependency coherency updates

runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 16.0.5-alpha.1.23472.1 -> To Version 16.0.5-alpha.1.23477.2 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231005.16

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23505.16

* Update dependencies from https://github.com/dotnet/emsdk build 20231006.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport
 From Version 9.0.0-alpha.1.23478.1 -> To Version 9.0.0-alpha.1.23506.1

Dependency coherency updates

runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 16.0.5-alpha.1.23472.1 -> To Version 16.0.5-alpha.1.23477.2 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport

* Update dependencies from https://github.com/dotnet/arcade build 20231006.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23506.2

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/xharness build 20231005.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23477.1 -> To Version 8.0.0-prerelease.23505.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/emsdk build 20231006.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport
 From Version 9.0.0-alpha.1.23478.1 -> To Version 9.0.0-alpha.1.23506.1

Dependency coherency updates

runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 16.0.5-alpha.1.23472.1 -> To Version 16.0.5-alpha.1.23477.2 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231006.9

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23506.9

* Update dependencies from https://github.com/dotnet/arcade build 20231006.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23506.2

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/xharness build 20231005.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23477.1 -> To Version 8.0.0-prerelease.23505.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231008.1

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23508.1

* Update dependencies from https://github.com/dotnet/arcade build 20231008.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23508.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/xharness build 20231005.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23477.1 -> To Version 8.0.0-prerelease.23505.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231002.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23502.1

* Update dependencies from https://github.com/dotnet/runtime build 20231008.5

Microsoft.DotNet.ILCompiler , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 9.0.0-alpha.1.23470.17 -> To Version 9.0.0-alpha.1.23508.5

* Update dependencies from https://github.com/dotnet/cecil build 20231002.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23502.1

* Update dependencies from https://github.com/dotnet/sdk build 20231009.2

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23480.1 -> To Version 9.0.100-alpha.1.23509.2

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20231002.1

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.23472.1 -> To Version 9.0.0-alpha.1.23502.1

* Update Versions.props

* Update dependencies from https://github.com/dotnet/arcade build 20231010.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23463.1 -> To Version 9.0.0-beta.23510.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23502.1 (parent: Microsoft.DotNet.Helix.Sdk

* Update dependencies from https://github.com/dotnet/xharness build 20231005.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23477.1 -> To Version 8.0.0-prerelease.23505.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20231002.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23456.1 -> To Version 8.0.0-beta.23502.1

* Update dependencies from https://github.com/dotnet/icu build 20231009.3

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 9.0.0-alpha.1.23454.1 -> To Version 9.0.0-alpha.1.23509.3

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20231009.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23475.1 -> To Version 8.0.0-alpha.0.23509.1

* Update dependencies from https://github.com/dotnet/cecil build 20231009.2

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23476.1 -> To Version 0.11.4-alpha.23509.2

* Update dependencies from https://github.com/dotnet/sdk build 20231009.10

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23506.9 -> To Version 9.0.100-alpha.1.23509.10

* Update dependencies from https://github.com/dotnet/sdk build 20231010.2

Microsoft.DotNet.ApiCompat.Task
 From Version 9.0.100-alpha.1.23506.9 -> To Version 9.0.100-alpha.1.23510.2

* Sync up xunit.analyzers with xunit

* Update tests due to xunit.analyzers updates

* Update more tests

* More tests

* Fix unit test bug

* Disable "supported test return types" analyzer as we allow more options than traditional xunit

* Update arcade packages

* React to breaking changes

* test fix

* Fix more test failures

* More test fixes

* and more

* React to yet another breaking change

* Some runtime test failures

* remaining runtime test fix

* Update arcade versions for real

* Disable another xunit warning.

* Update arcade

* More tests

* fix

* ILCompiler trimming tests

* Update xliff-tasks dependency

* remove failing Assert.Empty calls

* Try to fix a few tests

* Use XUnit.Assert fork in external.csproj

* Fix ToEnumerableChars test

* Fix UpdateArray_StartWithDefault test

* Fix GetChars_WithReplacementFallback test

* Fix Reverse_NonSZArrayWithMinValueLowerBound test

* Fix System.Xml test failures

* System.IO.Ports failing tests

* Fix failing AppDomain tests under mono runtime

* Fix ILLink.Descriptor.xunit.xml

CompareTypedSets was moved to CollectionTracker

* Update SDK to latest RC1

* Undo Reverse test fix

* Fix Reverse_NonSZArrayWithMinValueLowerBound test

* Disable a failing test on mono runtime

* Disable Copy_SZArray on Mono as well

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Andy Gocke <andy@commentout.net>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2023-10-17 22:04:44 -04:00
Miha Zupan e235aeff6c
Set severity of rule CA1870 to warning (#92135)
* Set severity of rule CA1870 to warning

* Replace one more usage in nativeaot corelib

* Set severity for tests as well

* pragma disable the rule in nativeaot's reflection impl
2023-09-20 08:45:31 -07:00
David Cantú 6504cdb355
Enable rule CA1869 - Cache and reuse 'JsonSerializerOptions' (#90895)
* Enable rule CA1869

* Fix ocurrences in src/tasks projects

* Fix more occurrences on installer and mono\wasm
2023-09-11 12:53:49 -05:00
Stephen Toub 7d399f6dee
Enable analyzer analyzers (#91733)
Use Microsoft.CodeAnalysis.Analyzer in our builds, to help validate our analyzers and source generators. A few projects were doing this explicitly; this does it for all.
2023-09-08 10:08:48 -04:00
Mario Pistrich 4ed355098d
Enable new analyzer CA1868: 'Unnecessary call to 'Contains' for sets' and fix findings (#89652) 2023-07-29 09:41:35 +02:00
Stephen Toub 023b54a2d4
Enable CA1863 (Use 'CompositeFormat') as suggestion (#89029)
I ran it over runtime, and the only things flagged were for exceptional cases where it's not worth using.  Rather than a bunch of suppressions, I'm just enabling it as info-level.
2023-07-17 16:52:57 -04:00
Buyaa Namnan 9409e2d501
Enable new analyzers CA1862, CA1864 in runtime and fix findings. (#88700)
* Enable new analyzers CA1862, CA1864 in runtime and fix findings
2023-07-13 19:57:02 -07:00
dotnet-maestro[bot] 54cb57399d
[main] Update dependencies from dotnet/roslyn-analyzers (#87768)
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230618.1

* Suppress RS1038 analyzer

* Fix new failures found with CA1859 analyzer updates

* Disable CA2261 on test projects, fix more CA1859 findings

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Buyaa Namnan <bunamnan@microsoft.com>
2023-07-10 13:38:41 -07:00
Buyaa Namnan 5e67657e20
Fix warnings found with CA1861 Avoid constant arrays as arguments (#86229)
* Fix warnings found with CA1861

* Update src/coreclr/tools/aot/ILCompiler/Program.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Remove supression from static field

* Revert using string.Split(char)

* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
2023-05-31 14:01:01 -07:00
Stephen Toub ba777a8ba4
Update CodeAnalysis.src.globalconfig (#84059)
- Update the names of rules to match the current ones defined in NetAnalyzers
- Add a few more IDE rules, including enabling `IDE0280 Use nameof`
2023-04-15 16:59:41 -04:00
Buyaa Namnan e26e33f98a
Add CA 2021 into CodeAnalysis config (#82649) 2023-02-24 17:25:26 -08:00
Buyaa Namnan 6450398d88
Fix warnings found with new analyzer CA1860: Prefer Length/Count/IsEmpty property check over Any() (#81583)
Co-authored-by: Marek Safar <marek.safar@gmail.com>
2023-02-07 13:59:20 +01:00
Marek Safar 4b5029c808
Enable CA1859 - Use concrete types when possible for improved performance (#80848) 2023-01-31 14:46:51 +01:00
Stephen Toub fb7d8b186b
Add SYSLIB* analyzers to global configs (#80930)
* Add SYSLIB* analyzers to global configs

* Address PR feedback
2023-01-26 08:25:39 -05:00
Stephen Toub 699acfac91
Enable new analyzers CA1510/11/12/13 and CA1856/57/58 (#80149)
* Enable new analyzers CA1510/11/12/13 and CA1856/57/58

CA1510: Use ArgumentNullException throw helper
CA1511: Use ArgumentException throw helper
CA1512: Use ArgumentOutOfRangeException throw helper
CA1513: Use ObjectDisposedException throw helper
CA1856: Incorrect usage of ConstantExpected attribute
CA1857: A constant is expected for the parameter
CA1858: Use 'StartsWith' instead of 'IndexOf'

* More fixes

* Address PR feedback
2023-01-07 15:48:01 -05:00
Stephen Toub c0d2dda671
Update globalconfigs with recently added rules (#77538)
* Update globalconfigs with recently added rules

* Fix Fill(0) to Clear() in NTAuthentication
2022-10-28 17:19:53 -04:00
Buyaa Namnan 691cf0f448
Fix numeric IntPtr behavioral changes analyzer findings (#75557)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2022-10-04 17:26:05 -07:00
Adeel Mujahid 9d6396deb0
Fix typos (#72709) 2022-07-23 20:24:28 -07:00
Stephen Toub 9f7bf79991
Enable IDE0170 (Simplify property pattern) and IDE0200 (remove unnecessary lambda expression) (#71011)
As part of updating the config file with recently added rules, also turn on a few of them.
2022-06-28 14:46:45 -04:00
Buyaa Namnan 61ca87cb48
Update analyzer version and fix new findings (#70157) 2022-06-09 15:25:37 -07:00
Stephen Toub 71a73fb24c
Update Microsoft.CodeAnalysis.NetAnalyzers version (#68724)
- Delete some now unnecessary pragmas
- Enable the new Dictionary.ContainsKey guard rule
- Address on violation of the new rule
2022-05-01 06:22:11 -04:00
Stephen Toub 46871b8541
Enable new CA1311 (ToLower/Upper culture) and CA1852 (seal internal/private types) rules (#68268)
* Enable new CA1311 (ToLower/Upper culture) and CA1852 (seal internal/private types)

CA1311 flagged a few issues, all addressed by using ToLowerInvariant/ToUpperInvariant.

CA1852 flagged a bunch that previous cleanups around sealing types missed or that are new since.  Sealing types then highlighted places where protected or virtual members were being exposed unnecessarily, so those were fixed, too.  Adding sealed to things also highlighted some discrepancies in the order of "unsafe sealed" keywords, where the vast majority in the repo were "sealed unsafe", so I fixed the few that weren't.

* Address PR feedback and fix more CI failures

* Fix unit test build error
2022-04-21 16:22:53 -04:00
Stephen Toub 215b39abf9
Remove usage of !! from dotnet/runtime (#68178)
* Remove usage of !! from dotnet/runtime

- Use ArgumentNullException.ThrowIfNull instead where possible.  It's only usable for projects that only target .NET 6+, and it can't be used in places like this(...) or base(...).
- In other cases, if the project already has a ThrowHelper, augment it for null as needed and use that.
- For most of the extensions projects, add a ThrowHelper.ThrowIfNull that replicates ArgumentNullException.ThrowIfNull.
- For everything else, just use "throw new".

* Address PR feedback

* Address PR feedback

* Remove false positives from searches

* Address PR feedback
2022-04-21 13:25:52 -04:00
Stephen Toub b2e494c6ba
Enable recently added analyzers (and fix some violations) (#67292) 2022-03-30 06:55:28 -04:00
Stephen Toub 3ae87395f6
Initial roll out of !! (#64720)
* Bump version of C# compiler

This should be reverted when arcade brings in a new enough compiler.

* Fix a few new warnings from updating compiler

* Enable IDE0190 to employ parameter null checking

* Initial roll out of !!

* Fix more compiler warnings from upgrade, plus some test fixes / reverts

* Fix a few more tests

* Disable profiling test
2022-02-08 16:06:59 -05:00
Eric StJohn 1d751ba856
Update XUnit to 2.4.2-pre.22 (#63948)
* Update to Xunit build 2.4.2-pre.13

Also pick up latest pre-release of analyzers

* Disambiguate calls to Assert.Equals(double,double,int)

Xunit added a new Assert overload that caused a lot of ambiguous calls.
https://github.com/xunit/xunit/issues/2393

Workaround by casting to double.

* Fix new instances of xUnit2000 diagnostic

* Workaround xUnit2002 issue with implicit cast

Works around https://github.com/xunit/xunit/issues/2395

* Disable xUnit2014 diagnostic

This diagnostic forces the use of Assert.ThrowsAsync for any async method,
however in our case we may want to test that a method will throw
synchronously to avoid regressing that behavior by moving to the async
portion of the method.

* Use AssertExtensions to test for null ArgumentException.ParamName

Workaround https://github.com/xunit/xunit/issues/2396

* Update to Xunit 2.4.2-pre.22

* Fix another ArugmentException.ParamName == null assert
2022-01-20 10:35:50 -08:00
Stephen Toub a3b186b990
Enable new analyzers in global configs (#60914)
* Enable new analyzers in global configs

* Address PR feedback
2021-11-14 07:07:47 -05:00
Stephen Toub e118d3fc71
Update Microsoft.CodeAnalysis.CSharp.CodeStyle version (#59783) 2021-10-03 10:14:02 -04:00
Stephen Toub b42803d0ee
Add new analyzers to CodeAnalysis.globalconfig files (#59763) 2021-09-29 22:08:35 -04:00
Prashanth Govindarajan d2cef2fe4c
Runtime changes for DetectPreviewFeaturesAnalyzer (#59062)
* Turn on DetectPreviewFeaturesAnalyzer and runtime changes

* Missed decimal

* Add comments and update S.Runtime.csproj

* sq

* sq
2021-09-15 11:54:05 -07:00
Stephen Toub 03601a7a81
Switch to using globalconfig instead of ruleset for analyzer configuration (#57144) 2021-08-10 16:15:57 -04:00