Open
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Feature or Enhancement Proposal
Quick has a property wrapper called TestState which warrants there's no shared state between multiple tests by assigning the wrapped value to nil before each run.
However, the following example would trigger a quick_discouraged_call warning.
class TotoTests: QuickSpec {
override func spec() {
describe("foo") {
@TestState var foo: Foo! = Foo() // <- triggers a warning
context("bar") {
@TestState var bar: Bar! = .init() // <- triggers a warning
it("does something") {
bar.toto()
}
}
}
}
}
That's because the property is getting assigning by calling a function inside a describe/context.
I was wondering if it makes sense to not trigger when a using @TestState
property. I can even look into putting up a PR (and appreciate any suggestion that can help me).