Skip to content

Fix SwiftLint errors from latest SwiftLint release #543

Fix SwiftLint errors from latest SwiftLint release

Fix SwiftLint errors from latest SwiftLint release #543

Triggered via pull request September 18, 2024 13:54
@tyiutyiu
synchronize #180
Status Failure
Total duration 39s
Artifacts

swiftlint.yml

on: pull_request_target
SwiftLint
30s
SwiftLint
Fit to window
Zoom out
Zoom in

Annotations

10 errors
SwiftLint: Tests/NostrSDKTests/FilterTests.swift#L22
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Tests/NostrSDKTests/FilterTests.swift#L42
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Tests/NostrSDKTests/FixtureLoading.swift#L30
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/RelayRequest.swift#L35
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/GiftWrap/SealEvent.swift#L99
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/GiftWrap/GiftWrapEvent.swift#L122
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/MuteListEvent.swift#L112
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/BookmarksListEvent.swift#L153
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/GenericRepostEvent.swift#L83
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)
SwiftLint: Sources/NostrSDK/Events/MetadataEvent.swift#L187
Optional Data -> String Conversion Violation: Prefer failable `String(data:encoding:)` initializer when converting `Data` to `String` (optional_data_string_conversion)