swizzy
A fast, developer-friendly SwiftLint output formatter that groups issues by file and provides clickable file paths for your editor.

Features
- Grouped Output: Issues are organized by file for better readability
- Editor Integration: File paths with line numbers are clickable in most editors/IDEs
- Smart Colors: Automatically disables colors when output is redirected
- Zero Configuration: Works out of the box with SwiftLint JSON output
- Fast Performance: Built with Rust for maximum speed
- Flexible Input: Accepts piped input or runs SwiftLint directly
Installation
From crates.io (Recommended)
From Source
Usage
Basic Usage
# Pipe SwiftLint JSON output to swizzy
|
# Run from a directory containing Swift source files
Integration Examples
With Xcode Build Phases
Add a new "Run Script Phase" in Xcode:
if ; then
|
else
fi
With GitHub Actions
- name: Run SwiftLint with swizzy
run: |
swiftlint lint --reporter json | swizzy
With pre-commit hooks
- repo: local
hooks:
- id: swiftlint-swizzy
name: SwiftLint (formatted)
entry: bash -c 'swiftlint lint --reporter json | swizzy'
language: system
types:
Output Format
swizzy transforms SwiftLint's JSON output into a clean, grouped format:
src/ContentView.swift
src/ContentView.swift:12:5 warning Line should be 120 characters or less: currently 142 characters
rule: line_length
src/ContentView.swift:15:1 error Missing documentation for public declaration
rule: missing_docs
src/Models/User.swift
src/Models/User.swift:8:10 warning Variable name should be lowerCamelCase: 'user_id' should be 'userId'
rule: identifier_name
✖ 3 problems
Command Line Options
Exit Codes
- 0: No issues found or successfully processed
- 1: Issues were found and reported
Requirements
- SwiftLint (for direct execution mode)
- Rust 1.70+ (for building from source)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Inspired by the original swizzy JavaScript implementation
- Built for the Swift development community