Rely on SPM plugins to consume SwiftLint and SwiftFormat
Use their latest releases and fix some violations and issues. # Conflicts: # .github/workflows/linting.yml # .github/workflows/testing.yml
This commit is contained in:
parent
358908f161
commit
1bdf9d684b
40 changed files with 126 additions and 186 deletions
|
|
@ -10,7 +10,7 @@ import XCTest
|
|||
|
||||
@testable import passKit
|
||||
|
||||
class AdditionFieldTest: XCTestCase {
|
||||
final class AdditionFieldTest: XCTestCase {
|
||||
func testAdditionField() {
|
||||
let field1 = AdditionField(title: "key", content: "value")
|
||||
let field2 = AdditionField(title: "no content")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import XCTest
|
|||
|
||||
@testable import passKit
|
||||
|
||||
class ConstantsTest: XCTestCase {
|
||||
final class ConstantsTest: XCTestCase {
|
||||
func testIsOtpRelated() {
|
||||
XCTAssert(Constants.isOtpRelated(line: "otpauth://something"))
|
||||
XCTAssert(Constants.isOtpRelated(line: "otp_algorithm: algorithm"))
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import XCTest
|
|||
|
||||
@testable import passKit
|
||||
|
||||
class OTPTypeTest: XCTestCase {
|
||||
final class OTPTypeTest: XCTestCase {
|
||||
func testInitFromToken() {
|
||||
let secret = "secret".data(using: .utf8)!
|
||||
let secret = Data("secret".utf8)
|
||||
|
||||
let totpGenerator = Generator(factor: .timer(period: 30.0), secret: secret, algorithm: .sha1, digits: 6)!
|
||||
let totpToken = Token(name: "", issuer: "", generator: totpGenerator)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import XCTest
|
||||
@testable import passKit
|
||||
|
||||
class ParserTest: XCTestCase {
|
||||
final class ParserTest: XCTestCase {
|
||||
func testInit() {
|
||||
[
|
||||
("", "", "", []),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import XCTest
|
|||
|
||||
@testable import passKit
|
||||
|
||||
class TokenBuilderTest: XCTestCase {
|
||||
final class TokenBuilderTest: XCTestCase {
|
||||
private let SECRET = "secret"
|
||||
private let DIGITS = Constants.DEFAULT_DIGITS
|
||||
private let TIMER = Generator.Factor.timer(period: Constants.DEFAULT_PERIOD)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue