Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 16, 2024

This PR contains the following updates:

Package Update Change
nicklockwood/SwiftFormat minor 0.54.6 -> 0.58.5

Release Notes

nicklockwood/SwiftFormat (nicklockwood/SwiftFormat)

v0.58.5

Compare Source

  • 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

v0.58.4

Compare Source

  • 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

v0.58.3

Compare Source

  • 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

v0.58.2

Compare Source

  • 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.

v0.58.1

Compare Source

  • Fixed issue where async effect could be confused for async modifier, breaking docCommentsBeforeModifiers rule in protocol body with async functions
  • Fixed issue where wrapAttributes rule would unexpectedly wrap async effect
  • Fixed issue where .swift-version file was ignored if not also using config file
  • Fixed issue where multiple trailing closure syntax could be applied to ineligible function calls
  • Fixed issue where redundantAsync ignored await keyword in string interpolation
  • Fixed bug where acronyms rule would incorrectly always capitalize potentially matching acronyms one letter before end of identifier
  • Updated redundantLet rule to handle #Preview macro

v0.58.0

Compare Source

  • Added noForceUnwrapInTests rule
  • Added redundantThrows rule
  • Added redundantAsync rule
  • Added preferFinalClasses rule
  • Added support for Swift 6.2 raw identifiers
  • Updated trailingCommas rule to handle cases now supported by Swift 6.2
  • Updated trailingClosures rule to support multiple trailing closures
  • Added support for filtering config file options to a specific file path glob
  • Added --allow-partial-wrapping false option to disallow partial wrapping of functions and collections
  • Updated propertyTypes rule to support array, dictionary, and set literals
  • Added organizeDeclarations threshold options to organize types without adding marks
  • Added --type-body-marks remove option to organizeDeclarations
  • Updated organizeDeclarations to support organizing protocol bodies
  • Updated organizeDeclarations to treat associatedtype declarations as nested types, like typealias declarations.
  • Added --blank-line-after-switch-case always option to blankLineAfterSwitchCase
  • Add --default-test-suite-attributes option to preferSwiftTesting rule
  • Renamed --markdown-files options to strict and lenient
  • Updated redundantPublic rule to apply to private types
  • Updated trailingClosures and trailingCommas rules to support optional function calls
  • Fixed bug where markTypes rule wouldn't add marks after extensions
  • Fixed issue where redundantPublic broke @_spi annotated members
  • Improved parsing of nested markdown code blocks
  • Fixed issue where hoistTry rule could break @Test attribute
  • Fixed issue where redundantVoidReturnType rule could accidentally remove closure type
  • Fix blankLinesAroundMark not ignoring trailing comments at start of scope
  • Renamed throwingTests rule to noForceTryInTests
  • Updated singlePropertyPerLine to preserve async let declarations

v0.57.2

Compare Source

  • Updated trailingCommas rule to handle function declarations with generic arguments.
  • Updated --trailing-commas always to preserve trailing commas rather than unnecessarily removing trailing commas in some edge cases.
  • Fixed spurious deprecation message when using some non-deprecated options.

v0.57.1

Compare Source

  • Fixed issue where trailing commas were unexpectedly removed from initializer argument lists when using --trailing-commas always.
  • Fixed issue where redundantPublic rule didn't handle extensions on types defined in public extensions.
  • Added @Bindable to list of SwiftUI property wrappers used by organizeDeclarations rule.
  • Fixed case-sensitivity issue with preferFileMacro rule.

v0.57.0

Compare Source

  • Options now use --kebab-case. Existing option names without dashes remain supported for backwards compatibility. Some options have been renamed to improve clarity.
  • Added support for :this and :previous in comment directives.
  • Added support for formatting code blocks in Markdown files.
  • Added support for multiple --config file arguments.
  • Added singlePropertyPerLine rule to convert property declarations defining multiple properties into separate declarations.
  • Added redundantMemberwiseInit rule to remove explicit memberwise initializers that are identical to the struct's compiler-synthesized initializer.
  • Added redundantPublic rule to remove public access control from properties of internal types.
  • Added modifiersOnSameLine rule to keep declaration modifiers on the same line.
  • Added throwingTests rule to prefer using try and throws in unit tests rather than try!.
  • Added noGuardInTests rule to prefer convert guard statements in unit tests to try #require(...) / #expect(...) or try XCTUnwrap(...) / XCTAssert(...).
  • Added urlMacro rule to convert URL(string: "...")! initializers to a provided #URL("...") macro.
  • Added --trailing-commas collections-only and --trailing-commas multi-element-lists options to trailingCommas rule.
  • Added --type-blank-lines insert option to blankLinesAtStartOfScope and blankLinesAtEndOfScope rules.
  • Added --wrap-string-interpolation option to support disabling line wrapping within string interpolation.
  • Added --line-between-guards option to blankLinesAfterGuardStatements rule.
  • Added support for SARIF output format.
  • Improved performance of the docComments rule.
  • Fixed bug in docComments rule where trailing comments would be converted to doc comments.
  • Fixed bug where redundantNilInit rule would ignore type bodies with conformances.
  • Fixed bug where wrapEnumCases didn't handle some nested types correctly.
  • Fixed issue where # characters in config files couldn't be escaped.
  • Fixed issue where SwiftFormat for Xcode app would generate invalid config files with unescaped # characters.
  • Fixed issue where --wrap-return-type never didn't respect --allman true.

v0.56.4

Compare Source

  • Fixed issue where trailingCommas rule would not insert trailing commas in function declarations with return type
  • Fixed issue where trailingCommas rule would not insert trailing commas in array literals following ! operator
  • Fixed issue where unusedArguments rule would ignore function declarations with trailing commas
  • Fixed issue where void rule would not handle () types in typealiases
  • Fixed issue where redundantLet rule did not detect code inside result builders when nested in conditional compilation blocks

v0.56.3

Compare Source

  • Fixed issue where trailingCommas rule would insert commas in closure types and tuple types used in typealaises (not supported in Swift 6.1)

v0.56.2

Compare Source

  • Fixed issues where trailingCommas rule would insert commas in @escpaing or @Sendable closure types (not supported in Swift 6.1)
  • Fixed issue where privateStateVariables rule handled @Previewable attributes on previous line incorrectly

v0.56.1

Compare Source

  • Fixed several issues where trailingCommas rule would insert commas in places not actually supported by Swift 6.1
  • Fixed issue where --wrapeffects option would incorrectly unwrap async let properties following function call
  • Fixed issue where redundantEquatable rule would incorrectly remove == implementation in factor of synthesized implementation even if type contained non-Equatable properies like tuples
  • Fixed issue where extensionAccessControl rule would incorrectly hoist public ACL in @preconcurrency conformances
  • Fixed issue where organizeDeclarations rule would sometimes break property declarations with if expression values

v0.56.0

Compare Source

  • Added wrapMultilineFunctionChains rule to wrap chained method calls
  • Added environmentEntry rule to update SwiftUI EnvironmentValues definitions to use the @Entry macro
  • Added redundantEquatable rule to remove explicit Equatable conformances that would be compiler-synthesized
  • Added preferSwiftTesting rule to migrate XCTest-based tests to Swift Testing
  • Added swiftTestingTestCaseNames rule to remove redundant "test" prefix from Swift Testing test case methods.
  • Added preferCountWhere rule to prefer count(where:) over filter(_:).count
  • Added fileMacro rule to prefer either #file or #fileID, which have the same behavior in Swift 6 and later
  • Added blankLinesAfterGuardStatements rule to remove blank lines between consecuitve guard statements, and add blank line after last guard statement.
  • Added privateStateVariables rule to add private access control to @State properties
  • Added emptyExtensions rule to remove extensions that contain no declarations or conformances
  • Added --preserveacronyms option to acronyms rule
  • Added --wrapreturntype never option to wrapArguments rule
  • Updated trailingCommas to support Swift 6.1 trailing comma functionality
  • opaqueGenericParameters now supports protocol requirements without a body
  • --wrapeffects and --wrapreturntype now support protocol requirements and closure types
  • Fixed indentation of trailing closures after chained multiline method call when using same-line closing parens
  • blankLinesAtStartOfScope rule now supports switch cases and closure capture / parameter lists
  • Fixed issue where type under organizeDeclarations line count threshold would ignore swiftformat:sort directives
  • Fixed issue where organizeDeclarations rule would unexpectedly remove non-mark comments
  • Compiling SwiftFormat now requires Swift 5.7+
  • SwiftFormat prerelease builds can now be installed via Homebrew using brew install swiftformat --head. Prerelease builds are subject to breaking changes.

v0.55.6

Compare Source

  • Fixed parsing bugs related to parameter packs (repeat, each keywords)
  • Fixed bug where propertyTypes rule could cause build failure in properties with some type
  • Fixed bug where --callsiteparen balanced would have no effect when using --closingparen same-line
  • Fatal error messages now include the name of the currently-running rule
  • Docker build now uses Swift 6.0.3

v0.55.5

Compare Source

  • Fixed bug with yodaConditions rule mangling generic function calls
  • Fixed indenting of guard else or opening brace following if/switch expression
  • The organizeDeclarations rule no longer treats properties with didSet as computed
  • Improved formatting support for async and throwing closures

v0.55.4

Compare Source

  • Fixed inconsistent indenting of wrapped where clause for switch ... case statements
  • Fixed bug where unusedArguments could remove required arguments in some cases
  • The sortTypealiases rule now correctly handles any keyword

v0.55.3

Compare Source

  • Fixed bug where sortTypealiases rule could mangle generic types, or ones using the any keyword
  • The preferKeyPaths rule now only uses \\.self for Swift 6 and later (fix din't land yet in 5.10)
  • Added speculative fix for plugin artifactbundle not working on ubuntu-latest

v0.55.2

Compare Source

  • Fixed bug where unusedArguments failed to remove arguments that matched switch variable bindings
  • Fixed bug where unusedArguments failed to remove arguments that matched nested function call labels
  • Fixed spurious lint errors for blankLinesAtStartOfScope when using organizeDeclarations rule
  • Fixed bug where indentation errors were incorrectly reported as wrap rule lint errors
  • The preferKeyPaths rule now handles the \\.self case for Swift 5.10 and later
  • Fixed parsing of keyPaths beginning with \.?

v0.55.1

Compare Source

  • Fixed bug where docCommentsBeforeModifiers got confused by enum cases that match modifier names
  • Fixed bug where wrapEnumCases would mangle nested or successive enum declarations
  • Artifact Bundle now includes pre-built binary for ARM-based Linux systems

v0.55.0

Compare Source

  • Added docCommentsBeforeModifiers rule to hoist doc comments above declaration modifiers
  • Added unusedPrivateDeclarations rule to remove unused private or fileprivate declarations
  • Added propertyTypes rule to control the use of inferred or explicit types for properties
  • Renamed the --redundanttype option to --propertytypes as it's shared by both rules
  • Added --ranges preserve and --operatorfunc preserve options
  • Added --languagemode option to specify if you are using Swift 5 or 6 language mode
  • The organizeDeclarations rule can now sort declarations by name/type/visibility/etc
  • Fixed organizeDeclarations bug where --beforemarks unexpectedly matched keywords in function bodies
  • Fixed missing lint output for organizeDeclarations rule
  • Fixed bug in markTypes rule for chained protocol extension names
  • Renamed the confusing --onelineforeach option to --inlinedforeach
  • Git info can now be used in header comments when formatting code from stdin
  • You can now use the --outputtokens option to print output as tokens in JSON format
  • Each rule and test is now defined in a separate file to make it easier to maintain/contribute
  • Updated minimum Swift version for building SwiftFormat to 5.3 (you can still format older Swift code)
  • Docker build now uses static Linux SDK

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from ctreffs as a code owner November 16, 2024 21:56
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.0 Update dependency nicklockwood/SwiftFormat to v0.55.1 Nov 21, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch 2 times, most recently from 12d6289 to 4a50574 Compare November 24, 2024 09:01
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.1 Update dependency nicklockwood/SwiftFormat to v0.55.2 Nov 24, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 4a50574 to bdf20c7 Compare November 27, 2024 00:55
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.2 Update dependency nicklockwood/SwiftFormat to v0.55.3 Nov 27, 2024
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.3 Update dependency nicklockwood/SwiftFormat to v0.55.4 Dec 22, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from bdf20c7 to e195a79 Compare December 22, 2024 16:57
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.4 Update dependency nicklockwood/SwiftFormat to v0.55.5 Jan 21, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from e195a79 to 297f3b5 Compare January 21, 2025 09:55
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.5 Update dependency nicklockwood/SwiftFormat to v0.55.6 May 2, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 297f3b5 to 8f2d5e2 Compare May 2, 2025 22:15
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.6 Update dependency nicklockwood/SwiftFormat to v0.56.0 May 13, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch 2 times, most recently from d209d4c to e24e4c1 Compare May 14, 2025 03:52
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.56.0 Update dependency nicklockwood/SwiftFormat to v0.56.1 May 14, 2025
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.56.1 Update dependency nicklockwood/SwiftFormat to v0.56.2 May 27, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from e24e4c1 to 383b782 Compare May 27, 2025 19:53
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.56.2 Update dependency nicklockwood/SwiftFormat to v0.56.3 Jun 5, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 383b782 to e093919 Compare June 5, 2025 04:26
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.56.3 Update dependency nicklockwood/SwiftFormat to v0.56.4 Jun 15, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from e093919 to 17b416b Compare June 15, 2025 17:03
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 17b416b to 9d4244a Compare July 13, 2025 18:37
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.56.4 Update dependency nicklockwood/SwiftFormat to v0.57.0 Jul 13, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 9d4244a to 099e4d9 Compare July 14, 2025 19:25
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.57.0 Update dependency nicklockwood/SwiftFormat to v0.57.1 Jul 14, 2025
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.57.1 Update dependency nicklockwood/SwiftFormat to v0.57.2 Jul 15, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 099e4d9 to abb340e Compare July 15, 2025 03:33
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.57.2 Update dependency nicklockwood/SwiftFormat to v0.58.0 Sep 23, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from abb340e to e3cd5da Compare September 23, 2025 06:03
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.58.0 Update dependency nicklockwood/SwiftFormat to v0.58.1 Sep 24, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch 2 times, most recently from c17f71b to f231661 Compare September 29, 2025 18:43
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.58.1 Update dependency nicklockwood/SwiftFormat to v0.58.2 Sep 29, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from f231661 to fa9bc27 Compare October 4, 2025 16:56
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.58.2 Update dependency nicklockwood/SwiftFormat to v0.58.3 Oct 4, 2025
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.58.3 Update dependency nicklockwood/SwiftFormat to v0.58.4 Oct 16, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from fa9bc27 to a1a13c7 Compare October 16, 2025 09:13
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.58.4 Update dependency nicklockwood/SwiftFormat to v0.58.5 Oct 17, 2025
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from a1a13c7 to 6746536 Compare October 17, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants