Sebastien Marichal
Sebastien Marichal
### Description After the [latest](https://github.com/actions/runner-images/commit/2c549825eaed806e2c85bbfcd5e50d99ebaa61c1) update in ubuntu-latest we started having issues in our Azure pipeline while running a NET6 app with the error: ``` /usr/share/dotnet/sdk/7.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(376,5): error NETSDK1127: The targeting...
The [Settings_ValidSetup_ForAnalyzedProject](https://github.com/SonarSource/sonar-scanner-msbuild/blob/f9372cffd10a2db29595fe08ad3049fff78203c3/Tests/SonarScanner.MSBuild.Tasks.IntegrationTest/TargetsTests/RoslynTargetsTests.cs#L44-L78) unit test sometimes fails because it tries to write the binlog file in parallel. This is due to the test being a parameterized test and our helper methods...
S3431 implementation now checks if an assertion is done in a catch or finally block (see [here](https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/src/SonarAnalyzer.CSharp/Rules/ExpectedExceptionAttributeShouldNotBeUsed.cs#L53-L57)). The detection is very similar but less thorough than S2699 ([TestMethodShouldContainAssertion](https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/src/SonarAnalyzer.CSharp/Rules/TestMethodShouldContainAssertion.cs#L90-L124)) This detection...
S3431 has an exception for single-line tests. To check this, we count the number of statements in the method body https://github.com/SonarSource/sonar-dotnet/blob/b26c926cee88ba6ccbf97e9957fa6b4b89b062f7/analyzers/src/SonarAnalyzer.CSharp/Rules/ExpectedExceptionAttributeShouldNotBeUsed.cs#L28-L33 However, this will be count has one: ```cs [TestMethod]...
Buffers allocated using buffer pools such as [ArrayPool](https://learn.microsoft.com/en-us/dotnet/api/system.buffers.arraypool-1?view=net-8.0) should be returned after usage. ### Noncompliant example ```cs void Method(Stream stream) { var buffer = ArrayPool.Shared.Rent(512); // Noncompliant buffer is not...
Fixes #8187 It does not support changing usage outside of the current SyntaxTree (e.g.: in case of usage in partial class).
S5693 From this [community thread](https://community.sonarsource.com/t/s5693-parameter-cannot-be-used-to-allow-maximum-for-maxrequestlength/118368). Currently, `fileUploadSizeLimit` is expressed in bytes. This parameter is used to validate both [MaxRequestLength](https://learn.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.maxrequestlength?view=netframework-4.8.1), which is expressed in KB and `maxAllowedContentLength` which is expressed in...