Remove checks for setUp/tearDown from `overridden_super_call` rule (#4875)
This commit is contained in:
parent
5814ec1a1a
commit
41290a23d3
|
@ -36,6 +36,12 @@
|
|||
[Martin Redington](https://github.com/mildm8nnered)
|
||||
[#4896](https://github.com/realm/SwiftLint/issues/4896)
|
||||
|
||||
* Stop enforcing calls to super from the override functions `setUp()`,
|
||||
`tearDown()`, `setUpWithError()`, and `tearDownWithError()` in `XCTestCase`
|
||||
subclasses.
|
||||
[AndrewDMontgomery](https://github.com/andrewdmontgomery)
|
||||
[#4875](https://github.com/realm/SwiftLint/pull/4875)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Fix `lower_acl_than_parent` rule rewriter by preserving leading whitespace.
|
||||
|
|
|
@ -14,29 +14,17 @@ internal struct TestCaseAccessibilityRuleExamples {
|
|||
return nestedMember
|
||||
}
|
||||
|
||||
override static func setUp() {
|
||||
super.setUp()
|
||||
}
|
||||
override static func setUp() {}
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
}
|
||||
override func setUp() {}
|
||||
|
||||
override func setUpWithError() throws {
|
||||
try super.setUpWithError()
|
||||
}
|
||||
override func setUpWithError() throws {}
|
||||
|
||||
override static func tearDown() {
|
||||
super.tearDown()
|
||||
}
|
||||
override static func tearDown() {}
|
||||
|
||||
override func tearDown() {
|
||||
super.tearDown()
|
||||
}
|
||||
override func tearDown() {}
|
||||
|
||||
override func tearDownWithError() {
|
||||
try super.tearDownWithError()
|
||||
}
|
||||
override func tearDownWithError() {}
|
||||
|
||||
override func someFutureXCTestFunction() {
|
||||
super.someFutureXCTestFunction()
|
||||
|
|
|
@ -26,12 +26,7 @@ struct OverriddenSuperCallConfiguration: SeverityBasedRuleConfiguration, Equatab
|
|||
"viewDidDisappear(_:)",
|
||||
"viewDidLoad()",
|
||||
"viewWillAppear(_:)",
|
||||
"viewWillDisappear(_:)",
|
||||
// XCTestCase
|
||||
"setUp()",
|
||||
"setUpWithError()",
|
||||
"tearDown()",
|
||||
"tearDownWithError()"
|
||||
"viewWillDisappear(_:)"
|
||||
]
|
||||
|
||||
private(set) var severityConfiguration = SeverityConfiguration(.warning)
|
||||
|
|
Loading…
Reference in New Issue