Skip to content

Tags: airbnb/swift

Tags

1.1.0

Toggle 1.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update trailing commas rule to apply to all multi-element comma-separ… …ated lists (#323) #### Summary This PR updates the trailing commas rule to apply to all comma-separated lists, including function calls and function declarations. ```swift let terrestrialPlanets = [ mercury, venus, earth, mars, ] func buildSolarSystem( innerPlanets: [Planet], outerPlanets: [Planet], ) { ... } buildSolarSystem( innertPlanets: terrestrialPlanets, outerPlanets: gasGiants, ) ``` This PR also refines the rule to omit the trailing comma if the list only contains a single element. We feel this is especially the right choice in function calls with only a single argument, where the trailing commas adds unnecessary noise: ```swift // WRONG let planetsWithLife = [ earth, ] func buildSolarSystem( _ planets: [Planet], ) buildSolarSystem( terrestrialPlanets + gasGiants, ) // RIGHT let planetsWithLife = [ earth ] func buildSolarSystem( _ planets: [Planet] ) { ... } buildSolarSystem( terrestrialPlanets + gasGiants ) ``` <!--- required --->

1.0.8

Toggle 1.0.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update to SwiftFormat 0.56-beta-4 (#296) 

1.0.7

Toggle 1.0.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add rule to use doc comments before declarations (#262) 

1.0.6

Toggle 1.0.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add rules for how to wrap attributes on property declarations (#254) 

1.0.5

Toggle 1.0.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add rule to prefer for loops over functional `forEach(…)` method (#234) 

1.0.4

Toggle 1.0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Test multiple Xcode versions in CI (#224) 

1.0.3

Toggle 1.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update rule for long function declarations to specify effects (`async… …`, `throws`) should be written on the line after the closing paren (#205)

1.0.2

Toggle 1.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add rule to prefer opaque generic parameter syntax (#193) 

1.0.1

Toggle 1.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Infer Swift version from Package.swift swift-tools-version (#180) 

1.0.0

Toggle 1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add info about Swift Package Manager command plugin to README.md (#176)