# SwiftLint

Enforce Swift conventions in each target

Share a rule configuration across app, library and test code. Surface file-level diagnostics in CI and justify any inline rule disablement.

Category: Code quality
Languages: Swift

## Standard evidence

Rubric v1 · 5/8 verified · 3 unknown · 0 contrary · reviewed 2026-11-28

- **Definition** (verified) — The force_cast rule identifies forced as! conversions; upstream provides both triggering and non-triggering examples. Reviewed 2026-11-28. [Source](https://realm.github.io/SwiftLint/force_cast.html)
- **Measurement** (verified) — SwiftLint checks the selected rules and supports multiple reporting formats for the resulting violations. Reviewed 2026-11-28. [Source](https://raw.githubusercontent.com/realm/SwiftLint/main/README.md)
- **Conformance** (verified) — The published force_cast rule example set labels both triggering Swift input and examples expected to pass; it exercises this specific SwiftLint convention. Reviewed 2026-11-28. [Source](https://realm.github.io/SwiftLint/force_cast.html)
- **CI enforcement** (verified) — The documented strict option makes warnings fatal. Xcode users can run the linter in a build phase. Reviewed 2026-11-28. [Source](https://raw.githubusercontent.com/realm/SwiftLint/main/README.md)
- **Getting started** (unknown) — No reviewed evidence is recorded for this dimension.
- **Real-world adoption** (verified) — CodeRabbit checks changed .swift files with SwiftLint and supports selecting a repository-specific configuration. Reviewed 2026-11-28. [Source](https://docs.coderabbit.ai/tools/swiftlint)
- **Agent guidance** (unknown) — No reviewed evidence is recorded for this dimension.
- **Agent portability** (unknown) — No reviewed evidence is recorded for this dimension.

## Adoption

Use SwiftLint in this repository to meet this standard: Enforce Swift conventions in each target. Share a rule configuration across app, library and test code. Surface file-level diagnostics in CI and justify any inline rule disablement. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.

### Tool command

```
swiftlint lint
```

Seikika package: no verified installation is listed.

## References

- [Tool documentation](https://github.com/realm/SwiftLint)
- [Agent skill](/skills/swiftlint/SKILL.md)
