Use SwiftLint version 0.47.x
This commit is contained in:
parent
eba4df2f51
commit
bf3bb8d168
5 changed files with 11 additions and 10 deletions
|
|
@ -9,7 +9,7 @@ excluded:
|
||||||
|
|
||||||
## Active rules
|
## Active rules
|
||||||
|
|
||||||
whitelist_rules:
|
only_rules:
|
||||||
- anyobject_protocol
|
- anyobject_protocol
|
||||||
- array_init
|
- array_init
|
||||||
- attributes
|
- attributes
|
||||||
|
|
@ -81,6 +81,7 @@ whitelist_rules:
|
||||||
- implicit_getter
|
- implicit_getter
|
||||||
- implicit_return
|
- implicit_return
|
||||||
# - implicitly_unwrapped_optional
|
# - implicitly_unwrapped_optional
|
||||||
|
- inclusive_language
|
||||||
# - indentation_width
|
# - indentation_width
|
||||||
- inert_defer
|
- inert_defer
|
||||||
- is_disjoint
|
- is_disjoint
|
||||||
|
|
@ -168,6 +169,7 @@ whitelist_rules:
|
||||||
- switch_case_alignment
|
- switch_case_alignment
|
||||||
- switch_case_on_newline
|
- switch_case_on_newline
|
||||||
- syntactic_sugar
|
- syntactic_sugar
|
||||||
|
- test_case_accessibility
|
||||||
- todo
|
- todo
|
||||||
- toggle_bool
|
- toggle_bool
|
||||||
- trailing_closure
|
- trailing_closure
|
||||||
|
|
@ -180,7 +182,6 @@ whitelist_rules:
|
||||||
- type_name
|
- type_name
|
||||||
- unavailable_function
|
- unavailable_function
|
||||||
- unneeded_break_in_switch
|
- unneeded_break_in_switch
|
||||||
- unneeded_notification_center_removal
|
|
||||||
- unneeded_parentheses_in_closure_argument
|
- unneeded_parentheses_in_closure_argument
|
||||||
# - unowned_variable_capture
|
# - unowned_variable_capture
|
||||||
- untyped_error_in_catch
|
- untyped_error_in_catch
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import XCTest
|
||||||
@testable import Crypto
|
@testable import Crypto
|
||||||
|
|
||||||
class CryptoFrameworkTest: XCTestCase {
|
class CryptoFrameworkTest: XCTestCase {
|
||||||
typealias MessageConverter = (CryptoPGPMessage, NSErrorPointer) -> CryptoPGPMessage?
|
private typealias MessageConverter = (CryptoPGPMessage, NSErrorPointer) -> CryptoPGPMessage?
|
||||||
|
|
||||||
private let testText = "Hello World!"
|
private let testText = "Hello World!"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class PGPAgentTest: XCTestCase {
|
||||||
super.tearDown()
|
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
|
passKit.Defaults.encryptInArmored = encryptInArmored
|
||||||
let encryptedData = try pgpAgent.encrypt(plainData: testData, keyID: keyID)
|
let encryptedData = try pgpAgent.encrypt(plainData: testData, keyID: keyID)
|
||||||
passKit.Defaults.encryptInArmored = decryptFromArmored
|
passKit.Defaults.encryptInArmored = decryptFromArmored
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ import XCTest
|
||||||
@testable import Pass
|
@testable import Pass
|
||||||
|
|
||||||
class QRKeyScannerTest: XCTestCase {
|
class QRKeyScannerTest: XCTestCase {
|
||||||
let header = "-----BEGIN PGP PUBLIC KEY BLOCK-----"
|
private let header = "-----BEGIN PGP PUBLIC KEY BLOCK-----"
|
||||||
let body = "key body"
|
private let body = "key body"
|
||||||
let footer = "-----END PGP PUBLIC KEY BLOCK-----"
|
private let footer = "-----END PGP PUBLIC KEY BLOCK-----"
|
||||||
let privateHeader = "-----BEGIN PGP PRIVATE KEY BLOCK-----"
|
private let privateHeader = "-----BEGIN PGP PRIVATE KEY BLOCK-----"
|
||||||
|
|
||||||
var scanner = QRKeyScanner(keyType: .pgpPublic)
|
private var scanner = QRKeyScanner(keyType: .pgpPublic)
|
||||||
|
|
||||||
func testAddHeaderTwice() {
|
func testAddHeaderTwice() {
|
||||||
XCTAssertEqual(scanner.add(segment: header), .scanned(1))
|
XCTAssertEqual(scanner.add(segment: header), .scanned(1))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
SWIFTLINT_VERSION="0.40.*"
|
SWIFTLINT_VERSION="0.41.*"
|
||||||
|
|
||||||
if [[ -f "${SRCROOT}/.ci-env" ]]; then
|
if [[ -f "${SRCROOT}/.ci-env" ]]; then
|
||||||
echo "Running in a Continuous Integration environment. Linting is skipped."
|
echo "Running in a Continuous Integration environment. Linting is skipped."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue