Releases: airbnb/swift
Releases · airbnb/swift
1.2.0
What's Changed
- Enable
--allow-partial-wrapping falseand--type-body-marks removeoptions by @calda in #328 - Add autocorrect for "prefer
finalclasses" rule by @calda in #329 - Add rules to avoid force unwrap and redundant
throws/asyncin tests by @calda in #330 - Update SwiftFormat
--swift-versionto Swift 6.2 by @calda in #331 - Add modifierOrder rule by @jqsilver in #332
- Enable
validateTestCasesSwiftFormat rule by @calda in #333 - Enable
testSuiteAccessControlrule by @calda in #334 - Add rule to convert where clause generic constraints to inline angle bracket constraints for simple protocol conformances by @mannylopez in #335
- Add
Format rules should be non-destructiveby @swiftal64 in #337 - Internal SwiftUI views should use synthesized memberwise initializer by @calda in #347
- Clarify that SwiftUI synthesized init rule only applies to internal views by @calda in #350
- Add redundantViewBuilder rule by @miguel-jimenez-0529 in #353
- Add wrapSingleLineBodies by @mannylopez in #352
Full Changelog: 1.1.0...1.2.0
1.1.0
What's Changed
- Update
no_release_standard_outlint rule to include SwiftUI_printChangeshelper by @calda in #297 - Update SwiftFormat to 0.56 beta 6 by @calda in #298
- Add rule to avoid prefixing Swift Testing test case methods with "test" by @calda in #299
- Update to SwiftFormat 0.56-beta-9 by @calda in #301
- Remove unusedPrivateDeclarations rule by @mannylopez in #304
- Update
update:swiftformatto use nightly builds fromcalda/SwiftFormat-nightlyrepo by @calda in #307 - Wrap multi-line function declarations before the last paren by @mike-at-home in #306
- Match call-site paren on multi-line function calls by @mike-at-home in #308
- Enable
--wrapstringinterpolation preserveby @calda in #309 - Add rule to keep modifiers on the same line as the rest of the declaration by @calda in #311
- Add rule to avoid
publicaccess control ininternaltypes by @calda in #310 - add new proposed rule in new Testing section by @jqsilver in #313
- add new rule to prefer throwing in tests over
try!by @jqsilver in #314 - Move "Swift Testing test case names" rule to new "Testing" section by @calda in #316
- Enable autocorrect for "avoid guard in tests" rule by @calda in #315
- Add RedundantMemberwiseInit rule by @miguel-jimenez-0529 in #318
- Add urlMacro rule by @mannylopez in #317
- Update SwiftFormat options to --kebab-case by @calda in #319
- Add redundantTypedThrows SwiftFormat rule by @miguel-jimenez-0529 in #320
- Add redundantBreak SwiftFormat rule by @miguel-jimenez-0529 in #322
- Organize declarations in protocol bodies by @calda in #325
- Add rule to only define a single property or enum case per line by @calda in #324
- Organize declarations in struct bodies, but continue omitting MARK comments by @calda in #326
- Update trailing commas rule to apply to all comma-separated lists by @calda in #323
Full Changelog: 1.0.8...1.1.0
1.0.8
What's Changed
- Add rule to infer property types from the right-hand-side value rather than writing the type explicitly on the left-hand side by @calda in #263
- Add rule to remove blank lines between chained functions by @mannylopez in #272
- Add redundantProperty rule by @calda in #273
- Remove Linux #error from Package.swift by @calda in #278
- Add explicit category ordering configuration for organizeDeclarations rule by @calda in #280
- Add rule to place doc comments before any attributes by @calda in #281
- Add SwiftUI Property declaration to sub section ordering list by @miguel-jimenez-0529 in #282
- Add emptyExtension rule by @mannylopez in #283
- Add unusedPrivateDeclaration rule by @mannylopez in #284
- Replace several autocorrectable SwiftLint rules with SwiftFormat rules by @calda in #287
- Update infix operator spacing rule to clarify rule for operator definitions like
static func ==(lhs: T, rhs: T) -> Boolby @calda in #286 - Update colon spacing rule to apply to dictionary literals by @calda in #285
- Add SwiftFormat void rule by @miguel-jimenez-0529 in #288
- Add SwiftUI properties sort by @miguel-jimenez-0529 in #289
- Remove reference to SwiftLint Void rule by @miguel-jimenez-0529 in #290
- Add rule to prefer a generated Equatable implementation when possible by @calda in #292
- Update SwiftFormat
--swiftversionto 6.0 with--languagemode 5by @calda in #291 - Add rule to prefer a generated EnvironmentValue property implementation when possible by @miguel-jimenez-0529 in #293
- Add rule to prefer
count(where: { ... })overfilter { ... }.countby @calda in #295
Full Changelog: 1.0.7...1.0.8
1.0.7
What's Changed
- Update to SwiftFormat build based on 0.53.0 release by @calda in #255
- Add rule to avoid using semicolons by @calda in #260
- Fix markdown formatting of else-on-same-line rule by @calda in #258
- Add rule to insert a blank line following a switch case with a multi-line body by @calda in #259
- Update Swift version and SwiftFormat build by @calda in #264
- Add rule to use doc comments before declarations by @calda in #262
Full Changelog: 1.0.6...1.0.7
1.0.6
What's Changed
- Include version-specific package manifests when determining default minimum Swift version by @calda in #235
- Update to SwiftLint 0.52.1 by @calda in #239
- Add rule to avoid using
@unchecked Sendableby @calda in #237 - Add rule to prefer weak captures over unowned captures by @calda in #238
- Fix issue where linter would disallow "@unchecked Sendable" string in comments by @calda in #241
- Improve discussion and examples for rule to avoid unowned captures by @calda in #240
- Fix issue where package plugin wouldn't run SwiftLint lint-only rules unless passing in
--lintflag by @calda in #242 - Update to SwiftFormat 0.53 by @calda in #243
- Improve unit tests by @calda in #244
- Fix some typos in README by @Jager-yoo in #246
- Update Package.swift by @elfredpagan in #247
- Soften wording for rule to avoid using default in switch statements by @calda in #245
- Update to Swift 5.9 by @calda in #248
- Update omit-return rule discussion to include examples using if/swift expressions by @calda in #249
- Specify
--shortoptionals alwaysoption explicitly since default was updated toexcept-propertiesby @calda in #251 - Use
sortImportsrule instead of deprecatedsortedImportsrule by @calda in #252 - Add rule to add a line break after the assignment operator before a multi-line
iforswitchexpressions by @calda in #253 - Add rule to prefer using if/switch expressions when initializing a new property with the result of a conditional statement by @calda in #250
- Add rules for how to wrap attributes on property declarations by @calda in #254
Full Changelog: 1.0.5...1.0.6
1.0.5
What's Changed
- Add rule that protocol composition type aliases should be sorted alphabetically by @calda in #227
- Add rule that else statements should start on the same line as previous closing brace by @calda in #229
- Add rule to add a linebreak before the else keyword in a multi-line guard statement by @calda in #228
- Add rules to discourage #file and #filePath by @jqsilver in #231
- Add
packagekeyword to list of declaration categories by @calda in #232 - Add rule to omit
internalkeyword from declarations with internal access control by @calda in #233 - Add rule to prefer for loops over functional
forEach { ... }method by @calda in #234
Full Changelog: 1.0.4...1.0.5
1.0.4
What's Changed
Swift Package Plugin
- Update linter config to ignore Carthage, Pods, and .build directories by @interactord in #219
- Update SwiftFormat version to 0.51.8 by @calda in #223
- Update SwiftFormat --swiftversion to 5.8 by @calda in #225
- Test multiple Xcode versions in CI by @calda in #224
Swift Style Guide
- Fix broken SE-0156 link by @hanton in #207
- Include a missing space after some comment delimiters by @Jager-yoo in #208
- Clarify Rule: Name unused function parameters as underscores by @Jager-yoo in #210
- Clarify Rule: Never use the default case when switching over an enum by @teddy5518 in #214
- Clarify Rule: Use Swift's automatic enum values unless they map to an external source. by @teddy5518 in #215
- Clarify Rule: Use Swift's automatic enum values unless they map to an external source. by @teddy5518 in #216
- Clarify Rule: Multi-line arrays should have each bracket on a separate line. by @teddy5518 in #217
- Clarify Rule: Use caseless enums for organizing public or internal constants and functions into namespaces. by @teddy5518 in #218
- Fix typos in README.md by @teddy5518 in #220
Full Changelog: 1.0.3...1.0.4
1.0.3
What's Changed
- Bump SwiftFormat version by @calda in #201
- Fix typos in Rule 'prefer opaque generic parameter syntax' by @Jager-yoo in #202
- Update
prefer-opaque-generic-parametersXCTest example to pass throughfileandlineby @bachand in #204 - Update language around when an underscore prefix may be appropriate by @bachand in #203
- Update
Package.swiftto explicitly not support Linux by @calda in #206 - Update rule for long function declarations to specify effects (
async,throws) should be written on the line after the closing paren by @calda in #205
Full Changelog: 1.0.2...1.0.3
1.0.2
Swift Style Guide
- Added rule to prefer shorthand
if letoptional unwrapping syntax (#192) - Added rule to prefer simplified generic extension syntax (#194)
- Added rule to prefer opaque generic parameter syntax (#193)
- Added rule to prefer trailing closure syntax for closure arguments with no parameter name (#199)
SPM package plugin
- Improved handling of
--swift-formatand--excludearguments (#182)
1.0.1
- 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-versioncomment in yourPackage.swiftfile. You can customize this by calling the plugin with a--swift-versionargument. - Added
XcodeCommandPluginto support using the package plugin in Xcode 14 project workspaces