Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive in S3966: calls to arg.Dispose() are not handled correctly #1038

Closed
sm-g opened this issue Dec 28, 2017 · 0 comments
Closed
Assignees
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Milestone

Comments

@sm-g
Copy link

sm-g commented Dec 28, 2017

public static class Test
    {
        public static void CloseRabbitConnections(IConnection connection, IModel channel)
        {
            channel.Dispose();
            connection.Dispose(); // this line - S3966	Refactor this code to make sure 'Test' is disposed only once.
        }
    }

Related information

  • SonarC# Version 6.7.1.4347
  • Visual Studio Version 15.5.2
@michalb-sonar michalb-sonar added Area: Rules Type: False Positive Rule IS triggered when it shouldn't be. labels Jan 3, 2018
@michalb-sonar michalb-sonar added this to the 6.8 milestone Jan 3, 2018
@duncanp-sonar duncanp-sonar self-assigned this Jan 8, 2018
duncanp-sonar pushed a commit that referenced this issue Jan 8, 2018
@ghost ghost removed the Status: Needs Review label Jan 8, 2018
@duncanp-sonar duncanp-sonar changed the title S3966 false posititve False positive in S3966: calls to arg.Dispose() are not handled correctly Jan 8, 2018
@duncanp-sonar duncanp-sonar removed their assignment Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

No branches or pull requests

3 participants