SwiftLint integration

How to enable SwiftLint integration?

SwiftLint analysis should be enabled by default whenever codebeat detects any Swift files in your project. If you have been using SwiftLint before and have your own SwiftLint config file, we will use it. Otherwise, we have prepared a default config for you. You can check the default config here.

How does the SwiftLint integration with codebeat work?

It runs SwiftLint in the root of your project. If you are not familiar with SwiftLint you can learn more here: SwiftLint on GitHub

How to browse SwiftLint issues?

There are two ways to browse SwiftLint issues in our codebeat app. You can either view all the issues found in your project on your project dashboard in the Styles tab (located next to the Namespaces tab). Or you can also browse SwiftLint issues per namespace. In order to do so, head over to the namespace view (Project Dashboard -> Namespaces) and then choose any Swift namespace you are interested in. You should see the Style tab next to the Complexity and Duplication tabs there.

How are the issues mapped to namespaces?

SwiftLint issues are mapped to the deepest namespace found. Meaning that if the issue is found in a file and line allocated under a namespace, then we map it to the deepest namespace possible.

Do issues generated by SwiftLint affect the GPA score?

No, they won’t affect your GPA score in any way.

Why can’t see style issues in PR analysis?

As of now, we don’t track lint issues in PR analysis. We are evaluating whether to implement that feature.

Why can’t I see style issues where they should be listed?

One reason may be the crash of SwiftLint itself. It happens, and for now it may be problematic to fix in our app. We track projects that are causing such errors and try to debug them to our best capabilities.