periphery icon indicating copy to clipboard operation
periphery copied to clipboard

warning: Extension ‘ExtensionName' is unused

Open mayoralito opened this issue 9 months ago • 1 comments

periphery version
2.18.0

Given the code example:

class ViewControllerWebView: UIViewController {
    let webView = WKWebView()

    // …

   override func viewDidLoad() {
        super.viewDidLoad()
        webView.navigationDelegate = self
    }
}

extension ViewControllerWebView: WKNavigationDelegate {
  func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
        // 
    }
    
    func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
        // 
    }
    
    func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
        // 
    }
}

The report came as

ViewControllerWebView.swift:66:11: warning: Extension 'ViewControllerWebView' is unused

Which I think it’s a false positive unless I’m missing something else.

mayoralito avatar May 14 '24 14:05 mayoralito