quick_discouraged_focused_test misses declarations in classes that are not direct subclasses of QuickSpec
#4420
Closed
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
quick_discouraged_focused_test
misses focused declarations in classes that are not direct subclasses of QuickSpec
.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Linting Swift files in current working directory
Linting 'AppDelegate.swift' (1/3)
Linting 'SceneDelegate.swift' (2/3)
Linting 'FocusedDebugTests.swift' (3/3)
Done linting! Found 0 violations, 0 serious in 3 files.
Environment
- SwiftLint version (run
swiftlint version
to be sure)? 0.49.1 and 0.50.0-rc.2 - Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
- Paste your configuration file:
opt_in_rules:
- quick_discouraged_focused_test
- Are you using nested configurations? No
- Which Xcode version are you using (check
xcodebuild -version
)? Xcode 13.4.1 Build version 13F100 - Do you have a sample that shows the issue? Yes
class FocusedDebugBaseTests: QuickSpec {
}
class FocusedDebugTests: FocusedDebugBaseTests {
override func spec() {
super.spec()
// This should trigger a violation, but does not.
fdescribe("swiftlint") {
}
}
}