本文へ移動

SwiftFormat for Xcode バージョン履歴

Nick Lockwood · Xcode の Editor メニューから Swift コードを整形するためのソースエディタ拡張機能です。

Cask開発ツール 8,957
インストールコマンド
brew install --cask swiftformat-for-xcode
過去 30 日間のインストール数
316
Appランキング 532 位
過去1年間のインストール数
2509
過去365日間の合計
最新バージョン
0.64.7
ダウンロードサイズ
10MB
zip
更新頻度
毎週
過去30日間に6回リリース
  1. 0.64.7

    最新パッチ

    OpenNavo編集部 Homebrewへの登録

    SwiftFormat for Xcode 0.64.7 は綴りの選択肢を加え、クラッシュしたり Swift を誤って書き換える規則を修正します。

    SwiftFormat for Xcode 0.64.7 は 2026 年 11 月 14 日に公開され、commonTypos に綴りの選択肢を加え、クラッシュしたり Swift を誤って書き換える規則を修正します。出典: https://github.com/nicklockwood/SwiftFormat/releases/tag/0.64.7

    • commonTypos に --prefer-us-spelling と --preserve-iff が加わります。
    • hoistTry と hoistAwait は深い入れ子で終わらなくなることがなくなりました。
    • 負の整数のシフトでトークナイザがクラッシュしなくなりました。
    • preferKeyPath は #expect と #require の中に無効なコードを出さなくなりました。
    • forWhere は && で条件を結ぶとき、優先順位を変えなくなりました。
    • unusedArguments は引数のないライフタイム属性でクラッシュしなくなりました。
  2. 0.64.6

    パッチ

    OpenNavo編集部 Homebrewへの登録

    SwiftFormat for Xcode 0.64.6 は 2026-11-06 にリリースされました。このアップデートでは、value generics、tuple pack expansions の解析の問題と、有効な Swift コードを書き換えてしまういくつかのルールを修正しました。

    • value generic parameters、負の整数引数、整数制約、inline-array 型の解析を修正しました。
    • value generics をフォーマットする際に opaqueGenericParameters と simplifyGenericConstraints が無効なコードを生成する問題を修正しました。
    • redundantSelf は Logger 呼び出し内の self をデフォルトで保持するようになり、--self-required はデフォルトリストを拡張します。
    • organizeDeclarations と docComments が条件付き属性とドキュメントを宣言から切り離す問題を修正しました。
    • カスタムの接頭辞 / 演算子が正規表現リテラルと誤認され、誤った lint 行番号になる問題を修正しました。
    • parameter pack expansions を含む tuple 型の解析を修正しました。
    • 折り返された type conformances の Xcode スタイルのインデントを修正しました。
    • preferSwiftTesting が、条件コンパイルされた override や Swift Testing の型名を参照する XCTest ケースを変換してしまう問題を修正しました。
    • サブクラス化される可能性のある open クラスを残すよう、test suite のルールを更新しました。
    • singlePropertyPerLine が、値の数が一致しないときに tuple destructuring を分割する問題を修正しました。
    • redundantSendable が @usableFromInline 型から Sendable を取り除く問題を修正しました。
    • redundantClosure が、後に呼び出しが続く trailing closure 引数を削除する問題を修正しました。
    • braces、redundantClosure、redundantParens、unusedArguments での unsafe 式の扱いを修正しました。
    • numberFormatting が availability のバージョン番号の桁をグループ化する問題を修正しました。
    • trailingCommas が #warning、#error、その他のディレクティブにカンマを追加する問題を修正しました。
    • hoistTry と hoistAwait がキーワードを直前のキーワードに結合する問題を修正しました。
    • yodaConditions が、演算子の後で折り返された比較やマクロ呼び出しを含む比較を壊す問題を修正しました。
    • 関数の引数が型名を隠すときに redundantInit が .init を削除する問題を修正しました。
    • redundantBackticks が、Protocol という名前の型メンバーに必要なバッククォートを削除する問題を修正しました。
    • opaqueGenericParameters がクロージャ typealias のジェネリック引数内に some を導入する問題を修正しました。
    • redundantParens が、optional な opaque protocol composition に必要な括弧を削除する問題を修正しました。
    • extensionAccessControl が fileprivate を private 型の extension に引き上げる問題を修正しました。
    • duplicateImports が SPI 名の異なる import を削除する問題を修正しました。
    • preferExplicitFalse が括弧付きの条件コンパイル条件を壊す問題を修正しました。
    • preferLazyMap が inout 値をキャプチャするクロージャをエスケープさせる問題を修正しました。
  3. 0.64.5

    パッチ

    OpenNavo編集部 Homebrewへの登録

    SwiftFormat for Xcode 0.64.5 が 2026-10-31 にリリースされ、設定のマッチング、パース、および複数の書式ルールのエッジケースが修正されました。

    • フィルタ付きの設定セクションは、一致しないファイルに適用されなくなり、一致するセクションは順番に適用されます。
    • for ループ内の unsafe の処理と式のパースが改善されました。
    • unusedArguments は、ライフタイム属性から参照される引数を削除しなくなりました。
    • ストアドプロパティが条件付きコンパイルされる場合、redundantEquatable は == を削除しなくなりました。
    • preferForLoop は、式として使われる forEach 呼び出しを変換しなくなりました。
    • noForceUnwrapInTests は、キーパス内の強制アンラップを変換しなくなりました。
    • hoistTry、environmentEntry、braces、redundantClosure、redundantReturn、extensionAttributes、docComments で、配置、インデント、末尾スペースの問題が修正されました。
    • duplicateImports は、コード境界をまたぐ通常の重複インポートを削除するようになりました。
  4. 0.64.4

    展開

    OpenNavo編集部 Homebrewへの登録

    例外をスローする分岐での冗長な return の削除、ネストした if の平坦化、コマンドラインのパス処理を修正。

    SwiftFormat for Xcode 0.64.4 は 2026-10-27 にリリースされ、フォーマットルールとコマンドラインに関する 4 件の修正が含まれています。

    • redundantReturn は、ネストした条件文のすべての分岐が例外をスローする場合に依然として必要な return を削除しなくなりました。
    • nestedIf は、ネストした else { if ... } 分岐を else if チェーンに平坦化するようになりました。
    • コマンドラインは、-- オプション終了区切り文字の後に続くパスを処理します。
    • CLI 警告テストは、単独で実行したときに標準入力を待ってハングしなくなりました。
  5. 0.64.3

    展開

    OpenNavo編集部 Homebrewへの登録

    三項演算子の分岐内の andOperator と、次行のクロージャを付加する trailingClosures を修正。

    SwiftFormat for Xcode 0.64.3 は 2026-10-26 にリリースされ、2 件のルール修正が含まれています。

    • andOperator は、三項演算子の分岐内で && をカンマに置き換えなくなりました。
    • trailingClosures は、新しい行にある括弧付きクロージャを前のステートメントに付加しなくなりました。
  6. 0.64.2

    展開

    GitHub Release Homebrewへの登録

    • Fixed severe indent performance regression on large arrays of multiline initializers
    • Improved handling of #if directives in single-expression bodies, including return removal and SwiftUI formatting
    • Fixed unreachable-code warnings when building JSON encoding code with newer Swift versions
    • Fixed Windows release build setup
  7. 0.64.1

    展開

    OpenNavo編集部 Homebrewへの登録

    条件の改行・インデント、列挙・プロパティ・return・self・オーバーロード・波括弧の規則を修正。

    nestedIf/repeatedGuard の統合で条件改行が失われる問題を修正。wrapArguments は各節の内部だけに改行がある条件リストを折り返さず、wrapEnumCases は raw value 後の case に対応します。

    propertyTypes が強制アンラップ/末尾クロージャー前の .init を消す問題、redundantReturn が do throws(...) 内の必要な空 return を消す問題、redundantSelf の末尾クロージャー後のローカル変数見落とし、redundantOverload の準拠宣言型での誤削除を修正。braces が条件コンパイル指令行へ波括弧を移す問題を修正。複数行 if/guard の字下げと改行を改善。

    https://github.com/nicklockwood/SwiftFormat/releases/tag/0.64.1

  8. 0.64.0

    展開

    OpenNavo編集部 Homebrewへの登録

    スナップショットによる段階的整形と、入れ子の if、連続する guard、未使用の列挙添字、コンテンツビルダー向けルールを追加。性能と Xcode の未変更行の保持を改善。.build・Build・DerivedData を既定で除外。

    スナップショットによる段階的整形と、入れ子の if、連続する guard、未使用の列挙添字、コンテンツビルダー向けルールを追加。性能と Xcode の未変更行の保持を改善。.build・Build・DerivedData を既定で除外。

    Source

  9. 0.63.1

    展開

    OpenNavo編集部 Homebrewへの登録

    ソートとテスト関連のオプションを追加し、convenience のデフォルト修飾子順を更新しました。複数の書式処理とルールの問題、および Xcode 27 でのビルドを修正しました。

    追加
    決定的なソートを行う --locale を追加。--boolean-guards-in-tests を追加。デフォルトは preserve。
    変更
    convenience のデフォルト修飾子順を Apple の慣例に合わせて更新。
    修正
    宣言・import のソート、空白、コメント、package import の処理を修正。文字列 API、複数行文字列、ドキュメントコメントのルール処理を修正。テスト名、インデント、Swift Testing、hoistTry の動作を修正。Xcode 27 でのプロジェクトのビルドを修正。

    SwiftFormat 0.63.1 では、決定的なソートを行う --locale オプションと、デフォルトが preserve の --boolean-guards-in-tests を追加しました。convenience のデフォルト修飾子順は Apple の慣例に沿うようになりました。

    sortDeclarations による末尾の空白やコメントの処理、空文字列を検索する replacingOccurrences 呼び出しを preferSwiftStringAPI が変更する問題、複数行文字列内での disable:next の動作を修正しました。docComments は、実行可能コードの後にある入れ子関数のコメントを誤って変換しなくなりました。swiftTestingTestCaseNames は、名前のない引数のアンダースコアを削除せず、頭字語を複数形にも変換しません。sortImports は package import をラベルなしとして扱わなくなりました。インデントでは、折り返された関数名と、--indent-case true 使用時の折り返された case パターンを修正しました。さらに、preferSwiftTesting によるデフォルトの suite 属性の重複を防ぎ、末尾クロージャを伴う中置式での hoistTry の配置を修正しました。Xcode 27 でのプロジェクトのビルドも修正しています。

    ソース:https://github.com/nicklockwood/SwiftFormat/releases/tag/0.63.1

  10. 0.63.0

    展開

    OpenNavo編集部 Homebrewへの登録

    書式ルールとオプションを追加し、Swift構文の処理とルール表示を更新しました。複数の書式ルールおよびコマンドラインオプションの問題も修正しています。

    追加
    ifExpressions、preferLazyMap、redundantExtendedLifetimeルールを追加。Markdownコードブロックの書式設定を無効にする<!-- no-format -->を追加。既定で有効なルールに--enableを使った際の警告を追加。--redundant-optional-bindingを追加。既定値はsame-name-only。
    更新
    --single-line-ternaryの既定値をconvertに変更。Swift構文、型、Swift Testingに関するルールを更新。ルール出力で既定、オプトイン、非推奨を区別。
    修正
    インデントや誤検出を含む書式ルールの境界事例を修正。モジュールセレクター、ジェネリクス、条件付きコンパイルを修正。Linuxリリースビルドのスタックサイズを1 MBに増加。

    SwiftFormat 0.63.0では、ifExpressions、preferLazyMap、redundantExtendedLifetimeルールを追加し、Markdownコードブロックの書式設定を無効にする<!-- no-format --> HTMLコメント構文を導入しました。--redundant-optional-bindingを追加し、既定値をsame-name-onlyとしました。また、既定で有効なルールに--enableを指定すると警告します。--single-line-ternaryの既定値はconvertに変更され、--wrapstringinterpolationは既定値を維持します。ルール出力では、既定、オプトイン、非推奨のルールを区別するようになりました。

    ルールの更新には、宣言の並べ替え、自動クロージャの検出、追加のExpressibleByXLiteral型、オプショナルバインディング、URLマクロ、Swift Testingの名前、ジェネリック拡張、コンパイラー生成のEquatableおよびHashable準拠への対応が含まれます。クロージャ、条件分岐、ジェネリクス、モジュールセレクター、インデントなどの書式上の境界事例や、複数のルールとオプションの問題を修正しました。Linuxリリースビルドではスタックサイズを1 MBに増やしました。

    出典:SwiftFormat 0.63.0リリース

  11. 0.62.1

    展開

    OpenNavo編集部 Homebrewへの登録

    複数のルールがデフォルトで無効になりました。`noGuardInTests` に新しいオプションが追加され、ルール文書を掲載した新しいウェブサイトが公開されました。

    ルール
    デフォルトで無効:isEmpty、preferContains、preferFirstWhere。同じくデフォルトで無効:preferCountWhere、preferMinOverSorted、preferFlatMap。
    オプション
    noGuardInTests に --guard-like-if-statements を追加。デフォルト:preserve。
    ウェブ
    ルール文書を掲載した新しいサイト:swiftformat.info。

    SwiftFormat 0.62.1 では、isEmpty、preferContains、preferFirstWhere、preferCountWhere、preferMinOverSorted、preferFlatMap の各ルールがデフォルトで無効になりました。

    noGuardInTests ルールに --guard-like-if-statements オプションが追加され、デフォルト値は preserve です。

    SwiftFormat の新しいウェブサイト swiftformat.info が公開され、ルール文書は swiftformat.info/rules で閲覧できます。

  12. 0.62.0

    展開

    GitHub Release Homebrewへの登録

    SwiftFormat new has a website: swiftformat.info! Rules documentation is now available at swiftformat.info/rules.

    • Added redundantSwiftUIGroup rule
    • Added preferContains rule
    • Added preferMinOverSorted rule
    • Added preferFlatMap rule
    • Added preferFirstWhere rule
    • Enabled isEmpty rule by default
    • Split wrapConditionalBodies rule into wrapIfStatementBodies, wrapIfExpressionBodies, wrapGuardStatementBodies
    • Added --indent-blank-lines option to match the surrounding context
    • Added --line-wrap-threshold option for length-based wrapping
    • Added --type-blank-lines consistent option
    • Added start-only and end-only values to --type-blank-lines
    • Added before-non-local-declarations value for --doc-comments
    • Updated noGuardInTests rule to apply to guard-like if statements, use try #require for boolean conditions
    • Updated redundantSendable rule to be disabled by default, and to skip enums with indirect cases
    • Fixed redundantVariable incorrectly removing variables with modifiers or attributes
    • Fixed preferSwiftTesting spuriously adding UIKit import for UInt types
    • Fixed $name closure parameters incorrectly treated as unused when self has a same-named property
    • Fixed docComments rule incorrectly converting enum case group comments to doc comments
    • Fixed markTypes incorrectly considering top-level macro declarations
    • Fixed blankLinesBetweenScopes incorrectly inserting blank line before #elseif directives
    • Fixed emptyExtensions incorrectly removing extensions containing a freestanding macro declaration
    • Fixed organizeDeclarations incorrectly placing freestanding macro declarations after MARK comments
    • Fixed false positive redundantSendable for indirect enum
    • Fixed spaceAroundParens incorrectly inserting space before Optional.some(...) in subsequent @Test arguments
  13. 0.61.1

    展開

    GitHub Release Homebrewへの登録

    • Fixed race condition when parsing config files
    • Fixed redundantStaticSelf false positive inside closures and nested functions
    • Fixed unsafe keyword dot-spacing edge case
    • Fixed redundantSelf crash on switch expression inside if-let binding chain
    • Fixed redundantEquatable removing manual == for types with Any.Type stored properties
  14. 0.61.0

    展開

    GitHub Release Homebrewへの登録

    • Added wrapCaseBodies rule
    • Added redundantEmptyView rule
    • Added preferSwiftStringAPI rule
    • Added --test-case-access-control option for testSuiteAccessControl rule
    • Updated sortImports to support --import-grouping length,alpha
    • Updated --self-required to support assignment type names like OSLogMessage
    • Updated --suite-name-format default value to preserve
    • Fixed conditional import parsing with access modifiers
    • Fixed infinite loop in organizeDeclarations when opening brace has a trailing comment
    • Fixed closing brace indentation with --trimwhitespace nonblank-lines
    • Fixed indentation of multiline raw string literals with --indent-strings
    • Fixed redundantParens incorrectly removing () from @MainActor closure signatures
    • Fixed wrapping inside parens of function declarations with no parameters
    • Fixed extensionAccessControl incorrectly hoisting public onto extensions of nested internal types
    • Fixed spaceAroundParens incorrectly removing space after nonisolated(nonsending) modifier
    • Fixed noGuardInTests incorrectly transforming guard #available conditions
    • Fixed trailing comma for @convention closures
    • Fixed number handling in Swift Testing test case name conversion
    • Fixed redundantSelf inserting self. inside #if/#elseif compiler directive conditions
  15. 0.60.1

    展開

    GitHub Release Homebrewへの登録

    • Fixed issue where redundantSendable rule would unexpectedly remove Sendable conformance on type defined in public extension
    • Fixed issue where redundantSendable rule would leave behind extra space when removing :
    • Renamed redundantProperty rule to redundantVariable
    • Updated redundantVariable rule to preserve variables with explicit type annotations
    • Updated enumNamespaces rule to preserve Swift Testing suites as structs
  16. 0.60.0

    展開

    GitHub Release Homebrewへの登録

    • Added redundantSwiftTestingSuite rule
    • Added redundantSendable rule
    • Added preferExpicitFalse rule
    • Added support for :: module selector syntax
    • Added support for value generics syntax
    • Updated swiftTestingTestCaseNames to use raw identifiers by default
    • Updated swiftTestingTestCaseNames to use UpperCamelCase for test suite names
    • Updated redundantSelf to handle guard statements
    • Updated unusedArguments to handle for loop variables
    • Updated redundantType to better handle Set literals
    • Updated redundantParents to remove empty parens from attributes
    • Updated sortImports to sort imports by access control
    • Updated blankLinesBetweenImports to preserve indentation when indent disabled
    • Updated unusedPrivateDeclaration rule to preserve private @Test functions
    • Updated preferSwiftTesting rule to convert tests in extensions within the same file
    • Updated --stdin-path to not require the file to actually exist
    • Updated simplifyGenericConstraints to avoid adding duplicate constraints
    • Updated blankLinesAroundMark to insert blank line before MARK at start of scope when allowed by blankLinesAtStartOfScope config
    • Updated redundantEquatable to preserve == implementation in types with Strideable conformance
    • Fixed handling of switch statements with #if blocks in several rules
    • Fixed issue where async function declarations were wrapped using wrapArguments instead of wrapParameters
    • Fixed issue where redudantViewBuilder would remove @ViewBuilder from protocol members
    • Fixed redundantSelf parsing issue with throwing closure return types and switch expressions in if let condition
    • Fixed trailingCommas rule incorrectly adding commas to if #available checks
    • Fixed guard...else indentation in wrapArguments with wrap-conditions
    • Fixed issue where simplifyGenericConstraints would leave dangling where keyword in protocol members
    • Fixed issue where trailingCommas didn't handle closure capture lists with macro expressions
    • Fixed indentation for closure parameters on separate lines
    • Fixed issue where .init would be removed in code like [Foo].init { ... } (not supported until Swift 6.4).
    • Fixed issue where .swift-version files were read from excluded directories
    • Fixed incorrect replacement of && operator with , inside a ternary condition
    • Fixed unusedArguments bug in code with try? await
    • Fixed handling of MainActor attributes in redundantViewBuilder
  17. 0.59.1

    展開

    GitHub Release Homebrewへの登録

    • Reverted changes to indent rule --ifdef handling from 0.59.0
    • Updated docComments rule to use doc comments on nested functions and handle conditional compilation blocks in function bodies
    • Updated spaceAroundBrackets to preserve space between global actor attribute and closure capture list
    • Updated redundantMemberwiseInit to preserve inits with attributes
    • Fixed handling of any keyword in sortTypealiases rule
    • Resolved build issue related to macOS 13 SDK availability
  18. 0.59.0

    展開

    GitHub Release Homebrewへの登録

    • Added simplifyGenericConstraints rule
    • Added validateTestCases rule
    • Added testSuiteAccessControl rule
    • Added wrapPropertyBodies rule
    • Added wrapFunctionBodies rule
    • Added redundantViewBuilder rule
    • Added --ifdef preserve option to indent rule
    • Added --prefer-synthesized-init-for-internal-structs option to redundantMemberwiseInit rule
    • Enabled more rules by default: blankLinesBetweenImports, docComments, emptyExtensions, environmentEntry, noForceTryInTests, noForceUnwrapInTests, redundantAsync, redundantEquatable, redundantMemberwiseInit, redundantProperty, redundantThrows
    • Updated typeSugar to only preserve explicit Optional<T> in structs with a synthesized memberwise initializer
    • Updated closing paren of single-argument functions and collections to wrap if needed
    • Updated redundantMemberwiseInit rule to support result builder attributes
    • Improved how organizeDeclarations handles structs with a synthesized memberwise initializer
    • Updated docComments rule to preserve formatting of comments with directives
    • Fixed --ifdef no-indent handling of method chains and nested directives
    • Fixed issue where XMLReporter did not properly escape strings
    • Fixed support for unsafe keyword
    • Fixed edge cases in spaceAroundBrackets rule
    • Fixed crash in sortTypealiases rule
    • Fixed issue where redundantSelf rule could crash if encountering a function with no body (e.g.@_silgen_name)
  19. 0.58.7

    展開

    GitHub Release Homebrewへの登録

    • Fixed redundantSelf not being applied inside if #available(...) { ... } clauses
    • Fixed fileHeader rule incorrectly setting creation year to current when file path contains spaces
    • Fixed mis-insertion for nil-init rule related to optional closure return values
    • Fixed unusedPrivateDeclarations false positive when call site was outside enabled range
    • Fixed sortImports rule incorrectly moving // swift-tools-version: comment directive
    • Fixed hoistTry rule sometimes producing mangled code when hoisting across line boundaries
    • Fixed crash in --ruleinfo command when rule options exceed the old max length requirement
    • Fixed crash in unusedArguments due to scope range bug
  20. 0.58.6

    展開

    GitHub Release Homebrewへの登録

    • Fixed docComments not being applied correctly after conditional switch...case
    • Trailing commas are no longer inserted inside #selector(...) expressions
    • Source files listed with --filelist are now formatted concurrently
    • Trailing comments are now kept with the same line when wrapping
    • Fixed spurious return removal inside repeat...while loops
    • Fixed bug with trailingClosures rule and property wrappers
    • Fixed performance regression introduced in 0.58.5
    • Reduced timeout threshold to 1ms per token
  21. 0.58.5

    展開

    GitHub Release Homebrewへの登録

    • Fixed regression with indenting of macros (introduced in 0.58.4)
    • Fixed spurious removal of return keyword inside for ... where loops
    • Fixed parsing error with for await case ... loops
    • Added XCTUnwrap to the default exclusion list for hoistTry
  22. 0.58.4

    展開

    GitHub Release Homebrewへの登録

    • Whitespace is no longer added or removed from blank lines in multiline string literals
    • Fixed trailingComma rule incorrectly inserting commas inside typed throws
    • Fixed issue where opaqueGenericParameters rule could cause build errors with existential types
    • Fixed false positive with unusedArguments when argument is only referenced inside a macro
    • The noGuardInTests rule now preserves custom failure messages
    • The noGuardInTests rule no longer adds throws to test methods when not needed
    • Removed redundant "default" values from options help descriptions
  23. 0.58.3

    展開

    GitHub Release Homebrewへの登録

    • Fixed parsing of [n of X] syntax for InlineArray in Swift 6.2
    • Fixed parsing error when an opening multiline string delimiter is followed by a space
    • Fixed issue where redundantInit rule could leave orphaned parentheses
    • Fixed bug where redundantInit was incorrectly applied to (Foo.self as Bar.Type) expressions
    • Fixed bug with parsing empty property accessors that broke redundantSelf rule
    • Fixed aliasing issue with acronyms rule where one acronym overlaps another
    • Fixed unexpected wrapping of closing parenthesis in wrapArguments rule
    • Added --unknown-rules option to support environments with older SwiftFormat versions
  24. 0.58.2

    展開

    GitHub Release Homebrewへの登録

    • Fixed issue where modifierOrder rule confused async effect for async modifier
    • Fixed issue where testing related rules incorrectly treated functions with arguments as test cases
    • Updated redundantInit rule to apply to init calls with single trailing closure
    • Updated README.md to reflect actual precedence behavior between .swift-version files and --swift-version arguments