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
Separating positive and negative test cases for rules #527
Comments
Which test cases do you have in mind? I'm not a fan of refactoring just because of refactoring. If the logic gets changed, we can change some test cases? |
Consider the following test file example for checking the naming convention. class MyClass {}//valid
class myclass {} // report
class myClass {} // report Detekt's current test case checks the violation count. However, detekt does not check if the wrong MyClass classes are reported. There could be case where the right one gets reported. |
Ah now I understand. Yes, that makes sense and should be the preferred way. |
This separates positive and negative test cases for rules. (#527)
A violation was reported when an equals function was used as a global function. The test cases for this rule were refactored. This separates positive and negative test cases for rules. (#527)
An interface can't contain a equals or hashCode function. The test cases for this rule were refactored. This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
This refactored rules/style test cases. This separates positive and negative test cases for rules. (#527)
This separates positive and negative test cases for rules. (#527)
Closed with 0d869e3 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics. |
At the moment the tests check the violation count.
However, there can be a case where the sum is correct and the findings are wrong.
Separating positive and negative test cases could help to minimize this problem.
The text was updated successfully, but these errors were encountered: