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)
|
[Martin Redington](https://github.com/mildm8nnered)
|
||||||
[#4896](https://github.com/realm/SwiftLint/issues/4896)
|
[#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
|
#### Bug Fixes
|
||||||
|
|
||||||
* Fix `lower_acl_than_parent` rule rewriter by preserving leading whitespace.
|
* Fix `lower_acl_than_parent` rule rewriter by preserving leading whitespace.
|
||||||
|
|
|
@ -14,29 +14,17 @@ internal struct TestCaseAccessibilityRuleExamples {
|
||||||
return nestedMember
|
return nestedMember
|
||||||
}
|
}
|
||||||
|
|
||||||
override static func setUp() {
|
override static func setUp() {}
|
||||||
super.setUp()
|
|
||||||
}
|
|
||||||
|
|
||||||
override func setUp() {
|
override func setUp() {}
|
||||||
super.setUp()
|
|
||||||
}
|
|
||||||
|
|
||||||
override func setUpWithError() throws {
|
override func setUpWithError() throws {}
|
||||||
try super.setUpWithError()
|
|
||||||
}
|
|
||||||
|
|
||||||
override static func tearDown() {
|
override static func tearDown() {}
|
||||||
super.tearDown()
|
|
||||||
}
|
|
||||||
|
|
||||||
override func tearDown() {
|
override func tearDown() {}
|
||||||
super.tearDown()
|
|
||||||
}
|
|
||||||
|
|
||||||
override func tearDownWithError() {
|
override func tearDownWithError() {}
|
||||||
try super.tearDownWithError()
|
|
||||||
}
|
|
||||||
|
|
||||||
override func someFutureXCTestFunction() {
|
override func someFutureXCTestFunction() {
|
||||||
super.someFutureXCTestFunction()
|
super.someFutureXCTestFunction()
|
||||||
|
|
|
@ -26,12 +26,7 @@ struct OverriddenSuperCallConfiguration: SeverityBasedRuleConfiguration, Equatab
|
||||||
"viewDidDisappear(_:)",
|
"viewDidDisappear(_:)",
|
||||||
"viewDidLoad()",
|
"viewDidLoad()",
|
||||||
"viewWillAppear(_:)",
|
"viewWillAppear(_:)",
|
||||||
"viewWillDisappear(_:)",
|
"viewWillDisappear(_:)"
|
||||||
// XCTestCase
|
|
||||||
"setUp()",
|
|
||||||
"setUpWithError()",
|
|
||||||
"tearDown()",
|
|
||||||
"tearDownWithError()"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
private(set) var severityConfiguration = SeverityConfiguration(.warning)
|
private(set) var severityConfiguration = SeverityConfiguration(.warning)
|
||||||
|
|
Loading…
Reference in New Issue