# SwiftLint

> Linter that enforces Swift style and conventions, with auto-fix

Source: https://talira.ai/catalog/swiftlint-9xkk742n
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting), [languages / swift](https://talira.ai/categories/languages/swift)
- Platforms: macos, linux, docker[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Backed by: [SwiftLint Contributors](https://talira.ai/orgs/swiftlint-contributors.md)

SwiftLint is a linter for Swift that enforces the style rules generally accepted by the Swift community, built mostly on SwiftSyntax, with some rules using SourceKit for type information. It runs from the command line, as Swift Package Manager build tool and command plugins, in an Xcode build phase, through Fastlane, Docker or a Git pre-commit hook. Rules are configured in .swiftlint.yml, opt-in rules and custom rules (Swift or regex) can be added, and many violations can be fixed automatically with --fix.

## Links

- Website: https://realm.github.io/SwiftLint/
- GitHub: https://github.com/realm/SwiftLint
- Docs: https://realm.github.io/SwiftLint/

## Problems it solves

- Enforce a consistent code style across my Swift project
- Show Swift style warnings in Xcode while I build
- Fail my iOS CI build when Swift code breaks our style rules

## Features

- Community style rules built on SwiftSyntax
- Auto-correct with --fix
- Swift and regex custom rules
- Swift Package Manager build tool and command plugins
- Xcode run script phase, Fastlane, Docker and pre-commit hook
- Nested and remote configuration files

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 0.87, adoption 0.86, momentum 0.65, community 1.00, backing 0.30, extensibility 0.20.

- last commit 5 days ago
- 40 commits in the last 90 days
- latest release 0.65.1 3 months ago
- 19.8k GitHub stars
- 492 contributors
- backed by SwiftLint Contributors

## Alternatives

- [Airbnb Swift Style Guide](https://talira.ai/catalog/airbnb-swift-style-guide-3arvn83b.md): Airbnb's Swift style guide, with a SwiftPM plugin that formats and lints to it
- [Credo](https://talira.ai/catalog/credo-163rrxe7.md): Static code analysis for Elixir, with a focus on teaching and code consistency
- [detekt](https://talira.ai/catalog/detekt-d5bkj5sz.md): A static code analyzer for Kotlin
- [RuboCop](https://talira.ai/catalog/rubocop-rxzhjmy8.md): A Ruby static code analyzer and formatter, based on the community Ruby style guide.
- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP
- [stylelint-config-standard](https://talira.ai/catalog/stylelint-config-standard-4rp8esbc.md): The standard shareable config for Stylelint

## Sources

[^1]: https://github.com/realm/SwiftLint/blob/main/LICENSE (checked 26 Nov 2026)
[^2]: https://github.com/realm/SwiftLint (checked 26 Nov 2026)
