daltoniam / Starscream

Websockets in swift for iOS and OSX
Apache License 2.0
8.34k stars 1.21k forks source link

Duplication Conditions Violation inside a switch in FoundationTransport.swift #1035

Open jpovedap opened 4 months ago

jpovedap commented 4 months ago

Describe the bug

When trying to build a project with SwiftLint we get a warning (or error if duplicate_conditions is configured): Duplication Conditions Violation... image

Steps to Reproduce

.

Expected behavior

.

Environment:

Additional context

If we go to the FoundationTransport.swift, we can see that the switch has the same case twice: https://github.com/daltoniam/Starscream/blob/c6bfd1af48efcc9a9ad203665db12375ba6b145a/Sources/Transport/FoundationTransport.swift#L187 https://github.com/daltoniam/Starscream/blob/c6bfd1af48efcc9a9ad203665db12375ba6b145a/Sources/Transport/FoundationTransport.swift#L210

jpovedap commented 4 months ago

Tried to open a PR but got no permissions:

image

FYI: @daltoniam