Use SwiftLint version 0.47.x

This commit is contained in:
Danny Moesch 2020-11-10 22:43:44 +01:00 committed by Mingshen Sun
parent eba4df2f51
commit bf3bb8d168
5 changed files with 11 additions and 10 deletions

View file

@ -9,7 +9,7 @@ excluded:
## Active rules
whitelist_rules:
only_rules:
- anyobject_protocol
- array_init
- attributes
@ -81,6 +81,7 @@ whitelist_rules:
- implicit_getter
- implicit_return
# - implicitly_unwrapped_optional
- inclusive_language
# - indentation_width
- inert_defer
- is_disjoint
@ -168,6 +169,7 @@ whitelist_rules:
- switch_case_alignment
- switch_case_on_newline
- syntactic_sugar
- test_case_accessibility
- todo
- toggle_bool
- trailing_closure
@ -180,7 +182,6 @@ whitelist_rules:
- type_name
- unavailable_function
- unneeded_break_in_switch
- unneeded_notification_center_removal
- unneeded_parentheses_in_closure_argument
# - unowned_variable_capture
- untyped_error_in_catch

View file

@ -13,7 +13,7 @@ import XCTest
@testable import Crypto
class CryptoFrameworkTest: XCTestCase {
typealias MessageConverter = (CryptoPGPMessage, NSErrorPointer) -> CryptoPGPMessage?
private typealias MessageConverter = (CryptoPGPMessage, NSErrorPointer) -> CryptoPGPMessage?
private let testText = "Hello World!"

View file

@ -31,7 +31,7 @@ class PGPAgentTest: XCTestCase {
super.tearDown()
}
func basicEncryptDecrypt(using pgpAgent: PGPAgent, keyID: String, encryptKeyID: String? = nil, requestPassphrase: @escaping (String) -> String = requestPGPKeyPassphrase, encryptInArmored: Bool = true, decryptFromArmored: Bool = true) throws -> Data? {
private func basicEncryptDecrypt(using pgpAgent: PGPAgent, keyID: String, encryptKeyID: String? = nil, requestPassphrase: @escaping (String) -> String = requestPGPKeyPassphrase, encryptInArmored: Bool = true, decryptFromArmored: Bool = true) throws -> Data? {
passKit.Defaults.encryptInArmored = encryptInArmored
let encryptedData = try pgpAgent.encrypt(plainData: testData, keyID: keyID)
passKit.Defaults.encryptInArmored = decryptFromArmored

View file

@ -11,12 +11,12 @@ import XCTest
@testable import Pass
class QRKeyScannerTest: XCTestCase {
let header = "-----BEGIN PGP PUBLIC KEY BLOCK-----"
let body = "key body"
let footer = "-----END PGP PUBLIC KEY BLOCK-----"
let privateHeader = "-----BEGIN PGP PRIVATE KEY BLOCK-----"
private let header = "-----BEGIN PGP PUBLIC KEY BLOCK-----"
private let body = "key body"
private let footer = "-----END PGP PUBLIC KEY BLOCK-----"
private let privateHeader = "-----BEGIN PGP PRIVATE KEY BLOCK-----"
var scanner = QRKeyScanner(keyType: .pgpPublic)
private var scanner = QRKeyScanner(keyType: .pgpPublic)
func testAddHeaderTwice() {
XCTAssertEqual(scanner.add(segment: header), .scanned(1))

View file

@ -1,4 +1,4 @@
SWIFTLINT_VERSION="0.40.*"
SWIFTLINT_VERSION="0.41.*"
if [[ -f "${SRCROOT}/.ci-env" ]]; then
echo "Running in a Continuous Integration environment. Linting is skipped."