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 positives on make Method static rule #6

Closed
rmcc13 opened this issue Jun 15, 2019 · 4 comments
Closed

False positives on make Method static rule #6

rmcc13 opened this issue Jun 15, 2019 · 4 comments
Assignees
Projects

Comments

@rmcc13
Copy link

rmcc13 commented Jun 15, 2019

I just added codacy to one of my .NET projects and it's really awesome. It provides a lot of useful information, however after running the analysis I get a lot of false positive issues on the make Method a static method rule. There are two scenarios I see issues for this rule that don't make sense. The first one is classes that implement an interface. Interface implementations must be instance methods, so this rule should not apply to those methods. Secondly, I have hundreds of these issues in my test projects. Test methods must be instance methods for the test framework to run them, so this rule should not apply to test methods.

I can deal with the false positives on interface implementations, but getting having to deal with the test issues becomes unwieldy and floods my codacy dashboard with noise, making it not very useful. Is there a way to disable a specific rule for a project for a filename pattern?

@ljmf00 ljmf00 self-assigned this Sep 10, 2019
@ljmf00
Copy link
Contributor

ljmf00 commented Sep 10, 2019

Hey @rmcc13 , can you check if it's still happening on this SonarC# version? I recently updated it to 7.16 and there's a lot of false positive fixes.

Thanks,
Luís

@mrfyda mrfyda added this to 🚧New Issues in Tools & OSS Sep 18, 2019
@ljmf00
Copy link
Contributor

ljmf00 commented Oct 28, 2019

Hey @rmcc13 ,

I will consider this issue as resolved on the next tool updates. If you still have problems, feel free to reopen it.

Thanks,
Luis

@ljmf00 ljmf00 closed this as completed Oct 28, 2019
@alanreyesv
Copy link

When is gonna be the next tool update?

@lolgab
Copy link
Contributor

lolgab commented Feb 20, 2020

It already happened. Now we are pushing another update to Sonar 8.3 but the updated in the thread are already online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Tools & OSS
New Issues
Development

No branches or pull requests

4 participants