You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there are two - probably more - cases that can lead to empty tests during development.
It's common to layout the tests when developing a new functionality and one might forget to remove unneeded tests before submitting the code for Code Review.
When refactoring code it's common to comment out tests that also require refactoring and one might forget to uncomment and refactor these tests before submitting the new patch set to Code Review.
In the last two weeks I caught this issue twice on Code Reviews. The rule would have thrown a violation to the developer before they could submit the code to Code Review.
Considerations:
Should the rule be configurable, if so what parameters should be configurable? Severity only.
Should the rule be opt-in or enabled by default? Why? I believe opt-in would be fine.
// This triggers a violation:
override↓func setUp(){}override ↓func tearDown(){}↓func testFoo(){}↓func testBar(){
// comment...
// comment...
// comment...
}
The text was updated successfully, but these errors were encountered:
Rule Request
I believe there are two - probably more - cases that can lead to empty tests during development.
In the last two weeks I caught this issue twice on Code Reviews. The rule would have thrown a violation to the developer before they could submit the code to Code Review.
Considerations:
The text was updated successfully, but these errors were encountered: