With Checker you can find circular dependencies in your Swift project. Having circular dependencies are a sign of potential problems. They should be avoided. Checker integrates beautifully with Xcode: It automatically checks for circular dependencies every time your hit
⌘ + R.
(Version 1.0.0 Beta; requires macOS 10.11.)
If Checker is integrated in your Xcode project as a Run Script build phase then your build process should not be slowed down significantly. The script merely executes a little helper utility (
start-analyzer). In turn, this helper utility just triggers a analysis. The actual analysis is performed by the Checker app. If the Checker app is not running (or not even installed) the build phase exits with
start-analyzer has a hard timeout: It will terminate after 5 seconds.
Checker looks at every Swift file and basically determines two things:
Based on these information Checker creates a dependency graph which is then used to quickly find cycles.
No. Although a circular dependency is usually a bad sign sometimes it is just what you want. You should however, keep circular dependencies to a minimum.
Yes. In rare cases it can happend that Checker reports something as a circular dependency which in fact does not exist. Please get in touch if this happens to you.