---
name: swiftlint
description: "Use when adopting SwiftLint to assess this standard: Enforce Swift conventions in each target"
---

# Apply SwiftLint

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

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by SwiftLint.
2. 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.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://github.com/realm/SwiftLint) for configuration and prerequisites.

## Tool invocation

```
swiftlint lint
```
