Skip to content

SA1313 should not be reported when method implements a interface #3555

Closed

Description

@drieseng

SA1313 should not be reported when a given method implements an interface method with parameter names that do not start with a lowercase letter.

For example:

public interface IDTExtensibility2
{
    // SA1313 is reported here, this is fine
    void OnStartupComplete(ref Array Custom);

    // SA1313 is reported here, this is fine
    void OnBeginShutdown(ref Array Custom);
}

public class AddIn : IDTExtensibility2
{
    // SA1313 should not be reported here
    void IDTExtensibility2.OnStartupComplete(ref Array Custom)
    {
    }

    // SA1313 should not be reported here
    public void OnBeginShutdown(ref Array Custom)
    {
    }
}

Activity

  1. bjornhellander commented on Oct 22, 2022

    @bjornhellander
    Contributor

    Grabbing this

  2. bjornhellander commented on Oct 22, 2022

    @bjornhellander
    Contributor

    @drieseng, can you confirm that the only SA1313 you get inside AddIn is for OnStartupComplete? That is at least the behaviour that I see. So you have a single unexpected SA1313 in your example?

  3. drieseng commented on Oct 22, 2022

    @drieseng
    Author

    @bjornhellander Indeed, SA1313 is only falsely reported for an explicit interface implementation. For the public method (OnBeginShutdown, in my example) it's already ok.

    Thanks for the PR!

  4. added this to the 1.2-beta.next milestone on Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions