sonar-swift icon indicating copy to clipboard operation
sonar-swift copied to clipboard

Remove backticks (`) from "protocol" and rename it.

Open ambrusha opened this issue 1 year ago • 0 comments

New Issue Checklist

Issue Description

Remove backticks (`) from "protocol" and rename it.

func urlSession(
        _ session: URLSession,
        webSocketTask: URLSessionWebSocketTask,
        didOpenWithProtocol protocol: String?
    ) {
        if let sessionDelegate = self.sessionDelegate as? URLSessionWebSocketDelegate {
            sessionDelegate.urlSession?(
                session,
                webSocketTask: webSocketTask,
                didOpenWithProtocol: `protocol`
            )
        }
    }

As you can see I don't use any custom names... just passing property from one func to another. But CI's Sonar gives me an error.

Environment

 Enterprise EditionVersion 10.3 (build 82913) 

ambrusha avatar Jan 06 '24 09:01 ambrusha