Swift Language Support

Summary

FeatureStatusNotes
MaintainabilityComplexity, duplication, code smells
Linting
Auto-formatting
Custom checks
Security scanningAppSec, dependencies, and secrets
Code metrics
Code coverage

Details

Maintainability
ComplexityAka cognitive complexity
Cyclomatic complexity
Identical code duplication
Similar code duplication
Code smells
Linters
SwiftLint*Tool to enforce Swift style and conventions.
StringsLint*Ensures localized strings are complete and not unused
Auto-formatters
SwiftFormat*CLI (and Xcode Extension) for formatting Swift code
Custom checks
Semgrep
ripgrep
Security scanning
GitleaksSecrets scanning
SemgrepAppSec (SAST)
TrivyDependency scanning (SCA) for CocoaPods and Swift package managers
TruffleHogSecrets scanning
Code coverage
slather
Cobertura coverage format
  • These plugins only run on macOS and are available via the Qlty CLI. They are not available on Qlty Cloud which runs on Linux.

File extensions

By default, Swift files are defined as:

[file_types.swift]
globs = ["*.swift"]

These patterns can be overridden from qlty.toml.

Supported Swift versions

We officially support Swift 6+ and later for maintainability checks and code coverage. Each plugin may have its own version requirements.