Airbnb Swift Versions Save

Airbnb's Swift Style Guide

1.0.7

1 week ago

What's Changed

Full Changelog: https://github.com/airbnb/swift/compare/1.0.6...1.0.7

1.0.6

5 months ago

What's Changed

Full Changelog: https://github.com/airbnb/swift/compare/1.0.5...1.0.6

1.0.5

9 months ago

What's Changed

Full Changelog: https://github.com/airbnb/swift/compare/1.0.4...1.0.5

1.0.4

1 year ago

What's Changed

Swift Package Plugin

Swift Style Guide

Full Changelog: https://github.com/airbnb/swift/compare/1.0.3...1.0.4

1.0.3

1 year ago

What's Changed

Full Changelog: https://github.com/airbnb/swift/compare/1.0.2...1.0.3

1.0.2

1 year ago

Swift Style Guide

SPM package plugin

1.0.1

1 year ago
  • The package plugin now uses precompiled binary dependencies for SwiftFormat and SwiftLint instead of compiling them from source. This resolves an issue where SPM would reject .package(url: "https://github.com/airbnb/swift", from: "1.0.0") as invalid.
  • The package plugin now automatically infers the package Swift version from the // swift-tools-version comment in your Package.swift file. You can customize this by calling the plugin with a --swift-version argument.
  • Added XcodeCommandPlugin to support using the package plugin in Xcode 14 project workspaces

1.0.0

1 year ago

🆕 Swift Package Manager command plugin

This repo now includes a Swift Package Manager command plugin that you can use to automatically reformat or lint your package according to the style guide. To use this command plugin with your package, all you need to do is add this repo as a dependency:

dependencies: [
  .package(url: "https://github.com/airbnb/swift", from: "1.0.0"),
]

and then run the format command plugin in your package directory:

$ swift package format

Usage guide

# Supported in Xcode 14+. Prompts for permission to write to the package directory.
$ swift package format

# When using the Xcode 13 toolchain, or a noninteractive shell, you must use: 
$ swift package --allow-writing-to-package-directory format

# To just lint without reformatting, you can use `--lint`:
$ swift package format --lint

# By default the command plugin runs on the entire package directory.
# You can exclude directories using `exclude`:
$ swift package format --exclude Tests

# Alternatively you can explicitly list the set of paths and/or SPM targets:
$ swift package format --paths Sources Tests Package.swift
$ swift package format --targets AirbnbSwiftFormatTool