From f139f45370ccc8e1fef546525d06ef63437850aa Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Sat, 4 Jul 2020 22:36:49 +0200 Subject: [PATCH] Enable SwiftLint rule 'empty_xctest_method' and fix all violations --- .swiftlint.yml | 2 +- pass.xcodeproj/project.pbxproj | 8 -------- passKitTests/passKitTests.swift | 34 --------------------------------- passTests/passTests.swift | 33 -------------------------------- 4 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 passKitTests/passKitTests.swift delete mode 100644 passTests/passTests.swift diff --git a/.swiftlint.yml b/.swiftlint.yml index bf650ac..a27c302 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -43,7 +43,7 @@ whitelist_rules: - empty_parameters - empty_parentheses_with_trailing_closure - empty_string -# - empty_xctest_method + - empty_xctest_method - enum_case_associated_values_count - expiring_todo # - explicit_acl diff --git a/pass.xcodeproj/project.pbxproj b/pass.xcodeproj/project.pbxproj index 8a65261..d5c4f4b 100644 --- a/pass.xcodeproj/project.pbxproj +++ b/pass.xcodeproj/project.pbxproj @@ -110,7 +110,6 @@ A239F5A52158C3F400576CBF /* passKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A26075781EEC6F34005DB03E /* passKit.framework */; }; A23DD0DC233FB46900E6CD83 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A23DD0DB233FB46900E6CD83 /* Assets.xcassets */; }; A26075811EEC6F34005DB03E /* passKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A26075781EEC6F34005DB03E /* passKit.framework */; }; - A26075881EEC6F34005DB03E /* passKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A26075871EEC6F34005DB03E /* passKitTests.swift */; }; A260758A1EEC6F34005DB03E /* passKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A260757A1EEC6F34005DB03E /* passKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; A260758D1EEC6F34005DB03E /* passKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A26075781EEC6F34005DB03E /* passKit.framework */; }; A260758E1EEC6F34005DB03E /* passKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A26075781EEC6F34005DB03E /* passKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -141,7 +140,6 @@ DC037CBC1E4DD47B00609409 /* TextFieldTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC037CBA1E4DD47B00609409 /* TextFieldTableViewCell.xib */; }; DC037CBF1E4ED4E100609409 /* TextViewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC037CBD1E4ED4E100609409 /* TextViewTableViewCell.swift */; }; DC037CC01E4ED4E100609409 /* TextViewTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC037CBE1E4ED4E100609409 /* TextViewTableViewCell.xib */; }; - DC13B1511E8640810097803F /* passTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC13B1501E8640810097803F /* passTests.swift */; }; DC193FFA1E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC193FF91E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift */; }; DC3E64E61E656F11009A83DE /* CommitLogsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3E64E51E656F11009A83DE /* CommitLogsTableViewController.swift */; }; DC4914961E434301007FF592 /* LabelTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4914941E434301007FF592 /* LabelTableViewCell.swift */; }; @@ -370,7 +368,6 @@ A260757A1EEC6F34005DB03E /* passKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = passKit.h; sourceTree = ""; }; A260757B1EEC6F34005DB03E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; A26075801EEC6F34005DB03E /* passKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = passKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A26075871EEC6F34005DB03E /* passKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = passKitTests.swift; sourceTree = ""; }; A26075891EEC6F34005DB03E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; A26075A61EEC7125005DB03E /* pass.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = pass.xcdatamodel; sourceTree = ""; }; A262A58C1E68749C006B0890 /* Base32.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Base32.framework; path = Carthage/Build/iOS/Base32.framework; sourceTree = ""; }; @@ -404,7 +401,6 @@ DC037CBE1E4ED4E100609409 /* TextViewTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TextViewTableViewCell.xib; sourceTree = ""; }; DC1208571E35EBE60042942E /* ObjectiveGit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjectiveGit.framework; path = Carthage/Build/iOS/ObjectiveGit.framework; sourceTree = ""; }; DC13B14E1E8640810097803F /* passTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = passTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DC13B1501E8640810097803F /* passTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = passTests.swift; sourceTree = ""; }; DC13B1521E8640810097803F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DC193FF91E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AdvancedSettingsTableViewController.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DC3E64E51E656F11009A83DE /* CommitLogsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitLogsTableViewController.swift; sourceTree = ""; }; @@ -729,7 +725,6 @@ 30C015A7214ED378005BB6DF /* Models */, 30C015A6214ED32A005BB6DF /* Parser */, 30B4C7BB24085A3C008B86F7 /* Passwords */, - A26075871EEC6F34005DB03E /* passKitTests.swift */, A26075891EEC6F34005DB03E /* Info.plist */, ); path = passKitTests; @@ -795,7 +790,6 @@ DC13B14F1E8640810097803F /* passTests */ = { isa = PBXGroup; children = ( - DC13B1501E8640810097803F /* passTests.swift */, DC13B1521E8640810097803F /* Info.plist */, ); path = passTests; @@ -1556,7 +1550,6 @@ 30A1D2AA21B32A0100E2D1F7 /* OTPTypeTest.swift in Sources */, 301F6468216165290071A4CE /* ConstantsTest.swift in Sources */, 30A1D29C21AF451E00E2D1F7 /* PasswordGeneratorFlavorTest.swift in Sources */, - A26075881EEC6F34005DB03E /* passKitTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1574,7 +1567,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DC13B1511E8640810097803F /* passTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/passKitTests/passKitTests.swift b/passKitTests/passKitTests.swift deleted file mode 100644 index 0832660..0000000 --- a/passKitTests/passKitTests.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// passKitTests.swift -// passKitTests -// -// Created by Yishi Lin on 11/6/17. -// Copyright © 2017年 Bob Sun. All rights reserved. -// - -import XCTest -@testable import passKit - -class passKitTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } -} diff --git a/passTests/passTests.swift b/passTests/passTests.swift deleted file mode 100644 index d18d8d3..0000000 --- a/passTests/passTests.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// passTests.swift -// passTests -// -// Created by Mingshen Sun on 24/3/2017. -// Copyright © 2017 Bob Sun. All rights reserved. -// - -import XCTest - -class passTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - measure { - // Put the code you want to measure the time of here. - } - } -}