daltoniam / Starscream

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

Add suppressed labels to enums #1006

Open mefsantos opened 9 months ago

mefsantos commented 9 months ago

Suggestion

This is not really a question but a suggestion. It'd be really useful to have suppressed labels in the enums. For instance:

public enum HTTPUpgradeError: Error {
case notAnUpgrade(Int, [String: String])
case invalidData
}

becomes

public enum HTTPUpgradeError: Error {
case notAnUpgrade(_ responseCode: Int, _ responseHeaders: [String: String])
case invalidData
}

It has no impact on usage since the operator "_" suppresses the label Swift Docs and really improves readability on undocumented code.