Skip to content

sindresorhus/swiftlint-config

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

swiftlint-config

Good starter config for SwiftLint

SwiftLint has a lot of rules and it takes time to adjust them to something sensible. You probably don't want exactly what I have, but this should be a good starting point. This is what I use for all my Swift projects.

Usage

  1. Create a .swiftlint.yml file in the root of your project with the following:
parent_config: https://raw.githubusercontent.com/sindresorhus/swiftlint-config/main/.swiftlint.yml

(Replace main with a specific commit hash if you want predictable builds)

  1. Follow the SwiftLint setup instructions.

Badge

Show off that you're using this config.

[![sindresorhus's SwiftLint config](https://img.shields.io/badge/SwiftLint-sindresorhus-hotpink.svg)](https://github.com/sindresorhus/swiftlint-config)

sindresorhus's SwiftLint config