Incorrect S1751 triggered by using block

I’m using SonarAnalyzer.CSharp Version, and the following triggers a S1751 “Loops with at most one iteration should be refactored”.

It’s not really a loop, so I think it’s a false positive.

The response (HttpResponseMessage) is IDisposable, so I’ll have to dispose of it.

using (var response = await _client.PostAsync(_config.EndpointUri, payload).ConfigureAwait(false))
    return HandleResponse(response);

1 Like

thanks @HenningNT and welcome to our community forum. I’ve opened issue 2472 to track this FP