Add a few more SwiftLint rules

This commit is contained in:
Marc Rousavy 2021-02-25 14:38:38 +01:00
parent 13f11975cc
commit 33619a800d
3 changed files with 22 additions and 2 deletions

View File

@ -19,6 +19,26 @@ opt_in_rules:
- reduce_boolean
- reduce_into
- sorted_first_last
- yoda_condition
- vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces
- vertical_parameter_alignment_on_call
- unused_import
- unused_declaration
- untyped_error_in_catch
- unowned_variable_capture
- unavailable_function
- switch_case_on_newline
- static_operator
- strict_fileprivate
- sorted_imports
- sorted_first_last
- required_enum_case
- redundant_type_annotation
- redundant_nil_coalescing
- attributes
- convenience_type
- explicit_self
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods

View File

@ -9,7 +9,6 @@
import Foundation
extension CameraView {
func focus(point: CGPoint, promise: Promise) {
withPromise(promise) {
guard let device = self.videoDeviceInput?.device else {

View File

@ -98,7 +98,8 @@ extension AVMetadataObject.ObjectType {
return "human-body"
case .salientObject:
return "salient-object"
default: break
default:
break
}
}
switch self {