Is there any static analysis tool which can help us detect memory leak cause by missing [weak self]?

I was wondering, is there any tool, which can help to detect memory leak caused by missing [weak self].

For instance, the following code contains memory leak issue caused by lack of [weak self]

class ImagePageViewController: UIPageViewController {

    lazy var memoryLeak = UIAction(
        title: "memory_leak",
        image: nil
    ) { _ in
        print(">>>> \(self)")
    }
}

Is there any tool which can help us to prevent such issue? I have tried  https://github.com/realm/SwiftLint

but it is not able to detect such.

This Swift language question is perhaps better asked on the Swift forums (https://forums.swift.com).

Is there any static analysis tool which can help us detect memory leak cause by missing [weak self]?
 
 
Q