S3928 - The parameter name 'logger' is not declared in the argument list

Hi,

We get a S3928 for the following code:

public class CoreRegistrationService(ILogger<CoreLocationService> logger, ICoreApiClient coreApiClient) : ICoreRegistrationService
{
    private readonly ILogger<CoreLocationService> _logger = logger ?? throw new ArgumentNullException(nameof(logger));

...

}

The code we’re using is actually a proposed solution.

We are using SonarQube Enterprise Edition Version 10.0 (build 68432).

Hey there.

We’ve fixed quite a few FPs on this rule in the last year:

Can you please update to SonarQube v10.4 and see if the FP is still there? v10.0 is an EOL version of SonarQube.

Version 10.4 fixed it. Thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.