LinthelmIntroductions to linters, static analysis and code-quality tools

Linters · 5 tools

Top 5 linters and analyzers for iOS and Android app teams

By the Linthelm editorial team · Published · Updated · Facts checked 21 November 2026 (Asia/Dhaka)

If your team ships Swift and Kotlin, start with SwiftLint for Swift conventions and detekt for Kotlin code smells, then add SonarLint for in-editor feedback across both platforms. This shortlist is for iOS and Android app teams that want to enforce style rules and catch code smells before changes merge. SonarQube and Infer follow for teams that need platform-wide checks or deeper bug detection in Java and Objective-C.

At a glance: the shortlist in order of fit for this use case
#ToolBest forKey featurePlatforms / deploymentPricingMore
1SwiftLintRealmEnforcing Swift style rules in Xcode and Swift Package projectsRules mostly built on SwiftSyntax, with some using Clang and SourceKit for type informationSwift Package Manager, Xcode, CocoaPods, Bazel, or built from sourceSee vendor pricing pageIntroduction
2detektdetektKotlin code smell analysis in Android and multiplatform projectsPlugins for Gradle, Maven and Bazel, plus a first-party Gradle pluginGradle, Maven, Bazel; Android, JVM, JS, Native and Multiplatform projectsSee vendor pricing pageIntroduction
3SonarLintSonarReal-time feedback in the IDE across mixed-language teamsQuick fixes, diff views and in-editor explanations with code examplesVisual Studio, VS Code, Eclipse, JetBrains IDEs, GitHub Codespaces and GitPodSee vendor pricing pageIntroduction
4SonarQubeSonarCentral quality gates on pull requests for mixed codebasesBranch and pull request analysis for bugs, maintainability issues and technical debt across 45+ languagesManaged cloud (SonarQube Cloud) or self-hosted server (SonarQube Server)See vendor pricing pageIntroduction
5InferMetaBug finding in Java and Objective-C code, such as null dereferences and racesAndroid and Java checks for null pointer exceptions and resource leaksNot stated on official pagesSee vendor pricing pageOfficial site

1 SwiftLint

By Realm

SwiftLint, from Realm, enforces Swift style and conventions. It is loosely based on the archived GitHub Swift Style Guide.

Why it is here: It is the only tool here built specifically to enforce Swift conventions, so it opens the list for iOS teams.

Best for
Enforcing Swift style rules in Xcode and Swift Package projects
Key features
  • Rules mostly built on SwiftSyntax, with some using Clang and SourceKit for type information
  • Build tool plugin for Swift Package and Xcode projects
  • Command plugin to run from the command line via Swift Package Manager
  • Install via CocoaPods (with version pinning), installer package, make install or Bazel
  • Can also run as an Xcode Run Script Build Phase
Limits
Documented for Swift only, so Kotlin and Java code need a separate tool. It is designed to analyze valid, compilable source code.
Platforms / deployment
Swift Package Manager, Xcode, CocoaPods, Bazel, or built from source
Pricing
See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)

2 detekt

By detekt

detekt is an open-source static analyzer for Kotlin that detects code smells. It is configurable and extensible.

Why it is here: It is the Kotlin counterpart to SwiftLint and documents Android support out of the box, so it comes second for Android teams.

Best for
Kotlin code smell analysis in Android and multiplatform projects
Key features
  • Plugins for Gradle, Maven and Bazel, plus a first-party Gradle plugin
  • Custom rules and rule sets for tracking anti-patterns
  • Baselines that suppress existing issues in legacy projects while blocking new ones
  • HTML, Markdown, SARIF and Checkstyle (XML) reports
  • Wrapper over ktlint available as a rule set
Limits
Documented for Kotlin projects, so Swift codebases need a different tool. Teams that need Java or Objective-C analysis should check the vendor documentation.
Platforms / deployment
Gradle, Maven, Bazel; Android, JVM, JS, Native and Multiplatform projects
Pricing
See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)

3 SonarLint

By Sonar

SonarLint, now called SonarQube for IDE, is an editor extension from Sonar. It gives real-time feedback on bugs, code smells, vulnerabilities and security hotspots as you code.

Why it is here: It brings feedback into the editor for both iOS and Android developers, but it is a general-purpose tool, so it follows the two mobile-specific linters.

Best for
Real-time feedback in the IDE across mixed-language teams
Key features
  • Quick fixes, diff views and in-editor explanations with code examples
  • Support for Visual Studio, VS Code, Eclipse and the JetBrains IDE family
  • Focus-on-new-code setting that filters issues to the current development cycle
  • Connected Mode that syncs rules and quality gates from SonarQube Server or SonarQube Cloud
  • Real-time analysis of over 20 languages
Limits
The official page does not name Swift or Kotlin in the material we used, so teams should confirm mobile language coverage in the vendor documentation.
Platforms / deployment
Visual Studio, VS Code, Eclipse, JetBrains IDEs, GitHub Codespaces and GitPod
Pricing
See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)

4 SonarQube

By Sonar

SonarQube is a code quality and security platform from Sonar. It is available as managed cloud or as a self-hosted server.

Why it is here: It covers branches and pull requests across 45+ languages rather than mobile languages specifically, so it fits teams that want one central gate after editor-level linting.

Best for
Central quality gates on pull requests for mixed codebases
Key features
  • Branch and pull request analysis for bugs, maintainability issues and technical debt across 45+ languages
  • Quality gates that decide what merges
  • Quality gate results shown in pull requests on major Git platforms
  • Secrets detection in the IDE, commits and pull requests
  • Server edition that can run self-managed, including air-gapped
Limits
The documentation describes broad language coverage and does not single out Swift or Kotlin rules. SCA requires SonarQube Advanced Security.
Platforms / deployment
Managed cloud (SonarQube Cloud) or self-hosted server (SonarQube Server)
Pricing
See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)

5 Infer

By Meta

Infer, from Meta, is a static analysis tool that reports potential bugs in Java and C/C++/Objective-C code before it ships.

Why it is here: It targets Android Java and iOS Objective-C and can reason across files, but its documentation does not list Swift or Kotlin, so it sits last.

Best for
Bug finding in Java and Objective-C code, such as null dereferences and races
Key features
  • Android and Java checks for null pointer exceptions and resource leaks
  • Annotation reachability, missing lock guards and concurrency race conditions in Java
  • Null pointer dereference and memory leak checks for C, C++ and Objective-C
  • Coding convention and unavailable API checks for C, C++ and Objective-C
  • Analysis that reasons across functions and methods in different files
Limits
The official pages list Java, C, C++, Objective-C and Erlang; Swift and Kotlin are not listed. It reports potential bugs rather than enforcing style conventions.
Platforms / deployment
Not stated on official pages
Pricing
See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)

How we chose these tools

We looked at three things: how closely each tool fits enforcing Swift and Kotlin conventions and finding code smells in mobile apps, which capabilities the vendor documents, and which build systems, editors and platforms the documentation names. The order reflects editorial fit for this use case. Tools that target mobile languages directly come first, and general-purpose analyzers come after them, with the order explained in each entry.

All facts come from official vendor pages, and each fact carries a check date. This list is built from documentation rather than product trials, so we describe what vendors state and do not describe how a tool behaves in your codebase. Where a page does not name a language or platform, we say so in the limits instead of guessing.

Order used in this guide: Ordered by how specifically each tool targets mobile languages (Swift, Kotlin, Java/Obj-C), closest fit first.

Frequently asked questions

What is the standard linter for Swift code?

SwiftLint, from Realm, is the tool on this list built specifically to enforce Swift style and conventions. It can run as a build tool plugin in Swift Package and Xcode projects, or as an Xcode Run Script Build Phase.

Which static analyzer detects code smells in Kotlin?

detekt is an open-source static analyzer for Kotlin that performs code smell analysis. It documents support for Android, JVM, JS, Native and Multiplatform projects, and it runs from Gradle with the detekt task.

Can I add a linter to an existing Kotlin project without fixing every old issue?

detekt documents baselines for this. A baseline suppresses existing issues in a legacy project while making sure no new issues are introduced.

Does Infer work for Swift and Kotlin apps?

Infer's official pages list Java, C, C++, Objective-C and Erlang. Swift and Kotlin are not listed, so check the vendor documentation if your app is written in those languages.

What is SonarLint called now?

Sonar now calls it SonarQube for IDE. It is an editor extension for Visual Studio, VS Code, Eclipse and the JetBrains IDE family, and Connected Mode links it to SonarQube Server or SonarQube Cloud.

Sources. Facts on this page come from each vendor's official pages, checked on the dates shown (Asia/Dhaka):

Linthelm is independent and not affiliated with the vendors listed. No vendor paid for inclusion or position. Product names belong to their owners. Features and prices change; confirm details on each official website.