From 5299ca25d79bba8af68c626471aae7cff6ce25b1 Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Sat, 4 Jul 2020 21:54:02 +0200 Subject: [PATCH] Enable SwiftLint rule 'class_delegate_protocol' and fix all violations --- .swiftlint.yml | 2 +- pass/Controllers/PasswordEditorTableViewController.swift | 2 +- pass/Controllers/QRScannerController.swift | 2 +- pass/Views/FillPasswordTableViewCell.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index ed30a86..90c9a34 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -10,7 +10,7 @@ whitelist_rules: - array_init # - attributes # Contradicts with SwiftFormat option 'funcattributes = prev-line'. - block_based_kvo -# - class_delegate_protocol + - class_delegate_protocol - closing_brace - closure_body_length - closure_end_indentation diff --git a/pass/Controllers/PasswordEditorTableViewController.swift b/pass/Controllers/PasswordEditorTableViewController.swift index 284a77a..5803713 100644 --- a/pass/Controllers/PasswordEditorTableViewController.swift +++ b/pass/Controllers/PasswordEditorTableViewController.swift @@ -29,7 +29,7 @@ enum PasswordEditorCellKey { case type, title, content, placeholders } -protocol PasswordSettingSliderTableViewCellDelegate { +protocol PasswordSettingSliderTableViewCellDelegate: AnyObject { func generateAndCopyPassword() } diff --git a/pass/Controllers/QRScannerController.swift b/pass/Controllers/QRScannerController.swift index 0ee9453..5ce782d 100644 --- a/pass/Controllers/QRScannerController.swift +++ b/pass/Controllers/QRScannerController.swift @@ -12,7 +12,7 @@ import passKit import SVProgressHUD import UIKit -protocol QRScannerControllerDelegate { +protocol QRScannerControllerDelegate: AnyObject { func checkScannedOutput(line: String) -> (accept: Bool, message: String) func handleScannedOutput(line: String) } diff --git a/pass/Views/FillPasswordTableViewCell.swift b/pass/Views/FillPasswordTableViewCell.swift index cff46a6..bfa07c0 100644 --- a/pass/Views/FillPasswordTableViewCell.swift +++ b/pass/Views/FillPasswordTableViewCell.swift @@ -9,7 +9,7 @@ import passKit import UIKit -protocol FillPasswordTableViewCellDelegate { +protocol FillPasswordTableViewCellDelegate: AnyObject { func generateAndCopyPassword() func showHidePasswordSettings() }