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

Rule Request: Empty Quick Blocks #2202

Open
2 tasks done
ornithocoder opened this issue May 11, 2018 · 0 comments
Open
2 tasks done

Rule Request: Empty Quick Blocks #2202

ornithocoder opened this issue May 11, 2018 · 0 comments

Comments

@ornithocoder
Copy link
Contributor

ornithocoder commented May 11, 2018

New Issue Checklist

Rule Request

  1. Why should this rule be added?

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 a new patch set to Code Review. In the last two weeks I caught this issue twice when reviewing code. The rule would have thrown a violation to the developer before they could submit the code to Code Review.

This rule would be similar to #2190, but for Quick blocks instead of XCTest methods.

  1. Provide several examples of what would and wouldn't trigger violations.
// triggers
beforeEach("too") {}
afterEach("too") {}
describe("too") {}
context("too") {}
it("too") {}
...
  1. Should the rule be configurable, if so what parameters should be configurable?

Severity only.

  1. Should the rule be opt-in or enabled by default? Why?

Opt-in would be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants