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:
Danny Mösch 2024-11-24 13:14:38 +01:00
parent 358908f161
commit 1bdf9d684b
40 changed files with 126 additions and 186 deletions

View file

@ -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")

View file

@ -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"))

View file

@ -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)

View file

@ -9,7 +9,7 @@
import XCTest
@testable import passKit
class ParserTest: XCTestCase {
final class ParserTest: XCTestCase {
func testInit() {
[
("", "", "", []),

View file

@ -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)