# Install swiftlint with Homebrew, dnf, MacPorts, Nix

Tool to enforce Swift style and conventions. Version 0.65.0 via Homebrew; verified 2026-06-27.

## Install

```sh
sudo av install brew:swiftlint
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install swiftlint
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install swiftlint
```

  Evidence: MacPorts ports tree: devel/swiftlint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install swiftlint
```

  Evidence: Fedora Rawhide package metadata: swiftlint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#swiftlint
```

  Evidence: nixpkgs package indexes: pkgs/by-name/sw/swiftlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:swiftlint
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/swiftlint>
- **Version:** 0.65.0
- **Source summary:** Tool to enforce Swift style and conventions
- **Homepage:** <https://github.com/realm/SwiftLint>
- **Repository:** <https://github.com/realm/SwiftLint>
- **Upstream docs:** <https://github.com/realm/SwiftLint#readme>
- **License:** MIT
- **Source archive:** <https://github.com/realm/SwiftLint.git>
- **Last updated:** 2026-06-27T09:34:51Z
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- swiftlint (cli)
- swiftlint (alias)

## Uses from macOS

- curl
- libxml2

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.65.0
- Package-manager updated: 2026-06-27
- Local data: ok
- Upstream repository: https://github.com/realm/SwiftLint
- info: No cached GitHub release or tag data was available.
## Project history and usage

SwiftLint is a Swift style and convention linter originally published by Realm. It became one of the default package-manager-installed tools in Swift projects because it gives teams a shared command-line style gate for local development, Xcode, SwiftPM, Bazel, CocoaPods, Mint, and CI.

### Project history

The SwiftLint repository was created in May 2015. The README describes the tool as loosely based on the archived GitHub Swift Style Guide and aligned with rules generally accepted by the Swift community.

As Swift tooling matured, SwiftLint moved from simple command-line linting into several build-system surfaces. Its README now documents Swift Package command and build-tool plugins, Xcode package integration, Homebrew, CocoaPods, Mint, Bazel, prebuilt packages, and source builds.

### Adoption history

SwiftLint's adoption follows the rise of Swift as a production language: teams needed automated style checks that could run before code review and inside Xcode builds. The official README includes a 2017 video introduction by JP Simard, showing that the project had already become notable in the Swift community by then.

The input package facts show broad packaging beyond Homebrew, including DNF, MacPorts, and Nix. That cross-manager presence is unusual for a Swift-specific CLI and signals sustained use outside one local macOS setup.

### How it is used

Common usage is `swiftlint` in a project directory, usually governed by `.swiftlint.yml`. The README emphasizes that SwiftLint analyzes valid, compilable Swift source, which is why teams often place it after or alongside normal build steps rather than as a substitute compiler.

Modern usage includes SwiftPM plugins and Bazel targets as well as traditional Homebrew-installed binaries called from Xcode script phases.

### Why package nerds care

SwiftLint is package-nerd significant because it packages a moving style rule set as a reproducible CLI. Version pinning matters: rule defaults, SwiftSyntax behavior, and autocorrection can affect source diffs across a whole repository.

It also demonstrates how Swift command-line tools escaped the single-machine Homebrew model and became build plugins, package dependencies, and CI artifacts.

### Timeline

- 2015: GitHub repository created.
- 2017: Official README links a recorded video introduction.
- 2018: GitHub release metadata includes 0.28.x and 0.29.x releases.
- 2026: GitHub release metadata shows active 0.63.x through 0.65.x maintenance.

### Related projects

- Related projects include SwiftFormat for formatting, SwiftSyntax for rule implementation, SourceKit/Clang for type information, SwiftLintPlugins for SwiftPM plugin consumption, and Bazel rules for build integration.

### Sources

- <https://api.github.com/repos/realm/SwiftLint>
- <https://github.com/realm/SwiftLint#readme>
- <https://realm.github.io/SwiftLint>
- input.source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .swiftlint.yml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** swiftlint
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Requirements:** macos, xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - swiftlint: normalized package name match | nixpkgs package indexes: pkgs/by-name/sw/swiftlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - swiftlint - 0.63.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: swiftlint from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tool to enforce Swift style and conventions | https://realm.github.io/SwiftLint/
- MacPorts - swiftlint: normalized package name match | MacPorts ports tree: devel/swiftlint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [eslint](https://www.automicvault.com/pkg/brew/eslint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [go-critic](https://www.automicvault.com/pkg/brew/go-critic/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [luacheck](https://www.automicvault.com/pkg/brew/luacheck/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [pmd](https://www.automicvault.com/pkg/brew/pmd/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [pylint](https://www.automicvault.com/pkg/brew/pylint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [revive](https://www.automicvault.com/pkg/brew/revive/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [selene](https://www.automicvault.com/pkg/brew/selene/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [spotbugs](https://www.automicvault.com/pkg/brew/spotbugs/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [swiftlint](https://www.automicvault.com/pkg/npm/swiftlint/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, developer, developer-tools, swiftlint.
- [credo](https://www.automicvault.com/pkg/brew/credo/) - Local package facts share a topical domain. Shared terms: analysis, cli, code, code-quality, developer.
- [dscanner](https://www.automicvault.com/pkg/brew/dscanner/) - Local package facts share a topical domain. Shared terms: analysis, cli, code, developer, developer-tools.
- [swiftlint](https://www.automicvault.com/pkg/npm/swiftlint/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/swiftlint.yml](https://github.com/automic-vault/db/blob/main/combined/swiftlint.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
